I agree that 'commandline -b' indeed has a less-than-optimal behaviour. We
could add a switch to tell it not to interpret escape characters, but I
really can't think of a use for the current behaviour either, so I agree
that it should just be fixed. I committed a fix to my personal branch on
gitorious to test if it works.

Jan



On Tue, Jan 24, 2012 at 06:47, Maxim Gonchar <gma...@gmail.com> wrote:

> Hi,
>
> I have a function which puts current commandline buffer to the editor.
> It's really useful sometimes.
>
> function .edit_cmd --description 'Edit cmdline in editor'
>                set -l f (mktemp)
>                set -l p (commandline -C)
>                commandline -b > $f
>                vim -c set\ ft=fish $f
>                commandline -r (more $f)
>                commandline -C $p
>                rm $f
>            end
>
> Recently, I've found that it breaks the quoted text. I.e. the command
> 'echo "first second" third' is looses its double quotes when editing.
> Unescaping is done in file builtin_commandline.c:199. I wonder if
> unescaping is really needed when cmd is not tokenized. I simply can not
> figure
> out any possible usage of it.
>
> So I propose to avoid unescape function when commandline is called without
> 'tokenize' key.
>
> What do you think about it?
>
> regards,
> Maxim
>
>
> ------------------------------------------------------------------------------
> Keep Your Developer Skills Current with LearnDevNow!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-d2d
> _______________________________________________
> Fish-users mailing list
> Fish-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fish-users
>
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to