Reputation: 4750
I want to do:
alias go=cd $(go.py $1)
then run
?> go home
go.py
prints some directory (/my/special/home), which is used by cd to go to that location. But, it doesn't work. If I change the alias to:
alias go=cd $(go.py home)
it works fine, but I want it to be a bit more configurable. Something with the syntax I don't understand I assume.
Upvotes: 1
Views: 57
Reputation: 158130
Use a function instead of an alias:
function go() {
cd "$(go.py "${1}")"
}
Upvotes: 3