summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-04-20 12:20:33 +0300
committerPaul Buetow <paul@buetow.org>2025-04-20 12:20:33 +0300
commiteb772ed0781531d6c4b618f46c6f4d48dd11ede1 (patch)
tree57e37765d1ca8540ba1accf5c63ebbb5f9580677
parent50fcf0511967ad6ebcdf59b5258d6d9856678693 (diff)
more on fish
-rw-r--r--dotfiles/fish/conf.d/config.fish11
1 files changed, 11 insertions, 0 deletions
diff --git a/dotfiles/fish/conf.d/config.fish b/dotfiles/fish/conf.d/config.fish
index 20efad6..e75d227 100644
--- a/dotfiles/fish/conf.d/config.fish
+++ b/dotfiles/fish/conf.d/config.fish
@@ -1 +1,12 @@
+set -g EDITOR hx
fish_vi_key_bindings
+
+# Use $EDITOR to edit the current command
+function edit-command
+ set -q EDITOR; or return 1
+ set -l tmpfile (mktemp --suffix .fish); or return 1
+ commandline >$tmpfile
+ eval $EDITOR $tmpfile
+ commandline -r -- (cat $tmpfile)
+ rm $tmpfile
+end