Re: [Fish-users] fish comments syntax vs bash
Status: Beta
Brought to you by:
liljencrantz
|
From: David A. <za...@uc...> - 2013-08-14 23:18:32
|
On Tue, 13 Aug 2013, Azeem Arshad wrote: > I noticed this in the way comment lines are treated in fish > > fish > ----- > z33m@z33m-asus ~> echo hello#world > hello > z33m@z33m-asus ~> echo hello #world > hello > > bash > ------- > [z33m@z33m-asus ~]$ echo hello#world > hello#world > [z33m@z33m-asus ~]$ echo hello #world > hello > > I am guessing that bash requires a new token starting with # to begin a > comment line, while fish also treats # in between tokens as comment line > start. > > I came across this when i was using bower commandline tool. which accepts > arguments of the form <packagename>#<version>. This command works in bash > but fails in fish, i have to quote the argument to get this working. > > Is this behavior a bug, or is this intentional? This has just come up on the issue tracker: https://github.com/fish-shell/fish-shell/issues/953 I don't think the behaviour is necessarily a bug, but it does kind of suck; I wouldn't be averse to forcing comments to begin with ' #' unless they are at the beginning of the line. David Adam fish committer za...@uc... |