I don’t use many aliases, although I know they are quite popular with some people. In general I have only two or three, which I use mostly because they’re coupled with some scripts that open or trigger a program in a particular way.
But I don’t like browsers that don’t clean up after themselves. I don’t like all-or-nothing cookie management, or goto lists or search histories. And so, for an alias, I use this:
That triggers an executable script in a hidden folder, and this it what’s in it:
rm $HOME/.elinks/gotohist $HOME/.elinks/searchhist 2>/dev/null
cp $HOME/.elinks/cookies.edit $HOME/.elinks/cookies
The first line tags it as a bash script. The next line triggers elinks and passes any address to it that I might have wanted as a start page.
When it’s done, the search history and the goto history are removed, with whatever feedback shuffled off to /dev/null (because those commands show an error message if the file doesn’t exist and can’t be deleted).
After that, a pristine cookie file is copied into place. The idea there is that there are some cookies that I care to keep — forum sign-ins or blog sign-ins — and those are in the cookies.edit file.
That way, when I’m done, the cookies I accrued through the course of my surfing are eradicated with a clean list, ready when I start elinks again. The only downside is that with two browsers open, if one of them exits, the cookies for both are reset. Just so you know. …
Here’s another example. I set the volume manually on my machine, usually at start time, with the amixer commands. But I have two aliases — usually called ‘volmute’ and ‘volreset’ — that trigger two more scripts. Here’s ‘mute.sh’.
amixer sset PCM mute
amixer sset Master mute
And of course, ‘volumes.sh’.
amixer sset PCM 50% unmute
amixer sset Master 90% unmute
With those two I can manage the general volume on moc or another audio source (like MPlayer) without hunting down the application in use. I type one word and the system falls mute (good for when the phone rings), and type another to reset it to a comfortable level.
I have a few others, but they’re not stellar, or they follow the examples of one I already explained, like a script that cleans up after emelfm2 and restores some settings. I’ll never be accused of being a master scripter, but little things like this are occasionally useful. :mrgreen: