summaryrefslogtreecommitdiff
path: root/fish
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-25 08:52:09 +0200
committerPaul Buetow <paul@buetow.org>2026-03-25 08:52:09 +0200
commit046eb5a071b3149eadaad8600d7d731195c63f27 (patch)
treeda5ecac230c43858c496896c95af5aa7ca4648b4 /fish
parent90662b5400bc76a7588d2b2053d57ff2070a3212 (diff)
Update
Diffstat (limited to 'fish')
-rw-r--r--fish/conf.d/quickedit.fish15
1 files changed, 14 insertions, 1 deletions
diff --git a/fish/conf.d/quickedit.fish b/fish/conf.d/quickedit.fish
index 974a739..b33e3b7 100644
--- a/fish/conf.d/quickedit.fish
+++ b/fish/conf.d/quickedit.fish
@@ -55,11 +55,24 @@ function quickedit
switch (count $files)
case 0
echo No result found
+ cd $prev_dir
return
case 1
set file_path $files[1]
case '*'
- set file_path (printf '%s\n' $files | fzf)
+ set file_path (printf '%s\n' $files REINDEX ABORT | fzf)
+ end
+
+ if test "$file_path" = ABORT; or test -z "$file_path"
+ cd $prev_dir
+ return
+ end
+
+ if test "$file_path" = REINDEX
+ rm -f $QUICKEDIT_DIR/.index
+ cd $prev_dir
+ quickedit $argv
+ return
end
if editor::helix::open_with_lock $file_path