This is my first time trying to contribute to fish, so please forgive any 
mistakes I make.  The patch is included as an attachment and Sanne Wouda 
<sanne.wo...@gmail.com> wrote this function which I changed a little.
>From 64af63b71f2bbf168a6e833390e72b5e04d27b66 Mon Sep 17 00:00:00 2001
From: Greg Reagle <greg.rea...@umbc.edu>
Date: Wed, 15 Apr 2015 15:52:49 -0400
Subject: [PATCH] Enable editing of command with $EDITOR.

---
 share/functions/edit-command.fish | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 share/functions/edit-command.fish

diff --git a/share/functions/edit-command.fish b/share/functions/edit-command.fish
new file mode 100644
index 0000000..ce6b30f
--- /dev/null
+++ b/share/functions/edit-command.fish
@@ -0,0 +1,10 @@
+# Edit the current command line with $EDITOR
+
+function edit-command
+	set -q EDITOR; or return 1
+	set -l tmpfile (mktemp); or return 1
+	commandline > $tmpfile
+	eval $EDITOR $tmpfile
+	commandline -r (cat $tmpfile)
+	rm $tmpfile
+end
-- 
1.9.1

------------------------------------------------------------------------------
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

Reply via email to