Is there a way to pass the trailing n characters of a command to a function, so that it executes it as two commands? For example I define my function as abcx and whenever I enter abcxfoo to the ...
When I enter a eg. a new alias into my .bashrc file I can't use it in that terminal window immediately and until recently I thought I had to restart the terminal to reload the .bashrc file. Then I ...
I don't know if this is expected, but my history is not saved across sessions. This is to say, if I close the window, then when I open it again, the history is empty. How can I persist it across ...
Just about every time I 'cd' to a different directory on my machine (in this case, running Mac OS X 10.6.7) via the command line (which is bash), I immediately type 'ls' to get the list of contents in ...
I normally have just the name of the current directory in my bash prompt (PS1='\u@\h:\W$ '), so if I am in ~/projects/superapp/src/ I get: hamish@host:src$ However I'd like to have an indication ...
The way my bash prompt is currently configured, it shows the whole path to the current directory. This is annoying when I'm deep inside a directory tree, as the prompt becomes so long that every ...