Hacker News new | ask | show | jobs
by orlandu63 5597 days ago
I would suggest mapping an alias instead of creating a function so that you will still be able to take advantage of parameter completion:

> alias to='cd ~/Sites/'

1 comments

Ah, much nicer. Thankyou.

Edit: On testing it doesn't work. 'to sitename' just goes straight to ~/Sites/. I knew there must have been a reason i used a function instead of an alias.

Oh, that's right. 'to sitename' becomes 'cd ~/Sites/ sitename' which is not what you want. My apologies.