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

Re: POSIX



On Feb 1,  4:44pm, Thorsten Haude wrote:
} 
} That would mean that you should not use '.[^.]*' to find hidden files.
} Instead it is stated to use '.[!.]*', which does not work in Zsh:

It does work, if you "unsetopt banghist" -- and having banghist unset is
the default state in NON-interactive shells, so any shell script that
uses the POSIX form would work correctly.  The circumflex form is for
backwards compatibility and as a shortcut in interactive shells so that
you don't have to type the extra backslash.

} ('.[\!.]*' works though.)

And that, in fact, would NOT work in a shell script, because the history
mechanism in the interactive line editor is what removes the backslash.



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