Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Curiosity... :)



At 12:46 +0100 10 Nov 2013, meino.cramer@xxxxxx wrote:
just stumbled across this:

Doing

   /home/user/>..

let me jump a directory in direction to the root.

You apparently have the AUTO_CD option enabled. The description of that in the zshoptions(1) man page is:

If a command is issued that can't be executed as a normal command, and the command is the name of a directory, perform the cd command to that directory.

There usually isn't a '..' command, but there's always a directory with that name, so that rule kicks in.

But doing

   /home/user/>.

gives me:

   .: not enough arguments
   zsh: exit 1

But '.' is a builtin command name, so that command is run. Since that's the first thing to be tried it doesn't matter that '.' is also a directory name.



Messages sorted by: Reverse Date, Date, Thread, Author