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

Re: Comment (# char) behavior in the sub-shell



On Sep 9,  7:33pm, Stanislav Seletskiy wrote:
}
} It seems for whatever reason everything after `#` in the sub-shell is ignored.
} 
} I've tried to disable INTERACTIVE_COMMENTS option without any success.

A subshell is not an interactive shell, so INTERACTIVE_COMMENTS does not
make any difference here, except that it delays treating "#" as a comment
until after the subshell has begun.  In bash for example the "#" would
comment out the closing paren and your expression wouldn't work at all.

Also, because NO_INTERACTIVE_COMMENTS is the default, propagating it from
the command line into subshells would break many of the same things that
you are concerned about being broken by histchars='!^'.

-- 
Barton E. Schaefer



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