In my .bash_profile
file, I'd like to setup a single command alias that is two commands that execute one after another. The first command takes an argument from the command line and the second is actually script (located in ~/bin
with execute permissions).
My profile file has this:
alias pd='function pd2() { pushd "$@"; set_title_tab; }'
I attempt to execute it in the shell like so:
$ pd ~/Documents/
and I get an error:
-bash: syntax error near unexpected token `~/Documents/'
set_title_tab
is a shell script written by William Scott
Is there a better way to accomplish this?