[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Nifty hack



I am working on an extension/replacement for cd which supports the 'cd -' 
option, which takes you back to the previous directory in which you were 
working.  Then I started thinking, why not do 'cd -N' where it will take you 
back to the Nth previous directory.

Right now I am still fumbling a little bit with es's syntax (it is a bit 
awkward).  So, my question is, is there a way to pull 'N', off of the '-N' 
without execing a sub-process?  I was thinking it could be done by setting the 
ifs to '-', but I can't quite seem to get it to do what I want.

Thanks
-scott
--
   _/    _/   _/_/_/  _/_/_/_/   _/_/_/  Scott C. Gray (gray@nas.nasa.gov)
  _/_/  _/  _/    _/ _/_/      _/    _/  NASA Ames Research M/S 258-6
 _/  _/_/  _/_/_/_/     _/_/  _/_/_/_/   For PGP public key, send me mail
_/    _/  _/    _/ _/_/_/_/  _/    _/    with subject line of "PGP request".