Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I usually just alias directories I frequent in .bashrc... Easy enough, I guess.


I'll do it all the time in my local shell session, along the following:

  # I make a point to always have the trailing slash,
  # it makes life easier.
  # Also, tab-complete works with this in Zsh.
  a=/some/really/long/path/that/I/dont/like/typing/
  b=/some/other/really/long/path/too/
  cd $a
  # ... do stuff ...
  cp one two three $b
  cd $b
  # ... do more stuff ...
  cp four five six $a
  cd $b/even/longer/path
And so forth. Since it is a normal variable, you can use it anywhere you need the path.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: