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

Reply via email to