It is possible to implement this with a fish function.
function edit_commandline
set -l tmp (mktemp /tmp/fish-fc.XXXXXX)
commandline > $tmp
eval $EDITOR $tmp
cat $tmp | read -l cmd
commandline -r "$cmd"
rm $tmp
end
Of course, if you do this properly, you'd have to check whether mktemp
failed, or whether EDITOR is set and executable.
To bind this to, for example, Ctrl-x, do
$ bind \cx edit_commandline
On Wed, 15 Apr 2015 at 16:32 Wai Yan Pong <wypon...@gmail.com> wrote:
> Yes, I missed that feature too. Hopefully developers of fish will consider
> adding that.
> That seems more adhere to the linux philiosophy---better leave it to the
> editor instead of the shell to do the editing.
>
> On Tue, Apr 7, 2015 at 12:38 AM, Gareth Skinner <g...@sknr.org> wrote:
>
>> Hi fish-users,
>>
>> In bash, you can hit Ctrl-x-e to open your current command line in
>> $EDITOR, make your modifications, and the shell runs your command when you
>> exit. It also exists in zsh:
>> http://stackoverflow.com/questions/890620/unable-to-have-bash-like-c-x-e-in-zsh
>>
>> I've been playing around with fish and sorely miss this feature. I can't
>> find it in fish -- does it exist?
>>
>> Thanks,
>> Gareth
>>
>>
>> ------------------------------------------------------------------------------
>> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
>> Develop your own process in accordance with the BPMN 2 standard
>> Learn Process modeling best practices with Bonita BPM through live
>> exercises
>> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual-
>> event?utm_
>> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
>> _______________________________________________
>> Fish-users mailing list
>> Fish-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/fish-users
>>
>>
>
> ------------------------------------------------------------------------------
> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
> Develop your own process in accordance with the BPMN 2 standard
> Learn Process modeling best practices with Bonita BPM through live
> exercises
> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual-
> event?utm_
>
> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF_______________________________________________
> Fish-users mailing list
> Fish-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fish-users
>
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users