[IPython-dev] [Ipython-svndiff] 2885 - Do not replace # w/ \# anymore
Wed Dec 12 02:25:00 CST 2007
> > On Dec 11, 2007 11:10 AM, Hans Meine <email@example.com> wrote:
> > > In bash, there is an "interactive comments" flag IIRC (settable with
> > > 'set'); for me, the latter is the desired behaviour. (Eases
> > > copy-pasting code from scripts.)
I just saw that it is even on by default; quoting bash(1):
> In a non-interactive shell, or an interactive shell in which the
> interactive_comments option to the shopt builtin is enabled (see SHELL
> BUILTIN COMMANDS below), a word beginning with # causes that word and all
> remaining characters on that line to be ignored. An interactive shell
> without the interactive_comments option enabled does not allow comments.
> The interactive_comments option is on by default in interactive shells.
Mittwoch, 12. Dezember 2007 06:46:34 Fernando wrote:
> On Dec 11, 2007 10:38 PM, Ville M. Vainio <firstname.lastname@example.org> wrote:
> > Ok, this suggests that the current behaviour (passing # to os.system
> > unescaped) is the correct one also for Linux. And after all, escaping
> > is easy...
> I don't know if tcsh has this optional flag, but I can live with the
> behavior. We'll see if we get any complaints...
My tcsh(1) says only:
> When the shell's input is not a terminal, the character `#' is taken to
> begin a comment. Each `#' and the rest of the input line on which it
> appears is discarded before further parsing.
No sign of interactive comments. zsh has them though.
Just for the records. I am +1 on Ville's change and an according comment.
More information about the IPython-dev