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

Change interactive command into a comment



With bash, I got into the following habit.  If I started typing a long command and then decided I didn’t want to execute it right now for some reason, I would hit control-A to get back to the start of the line and then add a # in front and hit return.

This would put the command into history and so later I could recall it, remove the #, and execute the command.

With zsh, when I add the # to the front and hit return I get:

    zsh: bad pattern: #

I found INTERACTIVE_COMMENTS but now I’m curious, what is zsh trying to do with a line starting with # ?  e.g. # echo dog

Attachment: smime.p7s
Description: S/MIME cryptographic signature



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