diff options
| author | Paul Buetow <paul@buetow.org> | 2025-04-23 22:14:45 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-04-23 22:14:45 +0300 |
| commit | 884c11c2bf2f55294f2b89341c791631aaeb6b6f (patch) | |
| tree | 76ec55476cb1d7817ff258cf0d140d50abb78c14 | |
| parent | 789050fd674330dae96d3b5fd28fa2e12e7256a5 (diff) | |
add pattern
| -rw-r--r-- | dotfiles/fish/conf.d/quickedit.fish | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/dotfiles/fish/conf.d/quickedit.fish b/dotfiles/fish/conf.d/quickedit.fish index d0c5fc0..b3ed9ab 100644 --- a/dotfiles/fish/conf.d/quickedit.fish +++ b/dotfiles/fish/conf.d/quickedit.fish @@ -2,9 +2,14 @@ set -gx QUICKEDIT_DIR ~/QuickEdit function quickedit set -l prev_dir (pwd) + set -l grep_pattern . + + if test (count $argv) -gt 0 + set grep_pattern $argv[1] + end cd $QUICKEDIT_DIR - set -l file_path (find -L . -type f -not -path '*/.*' | fzf) + set -l file_path (find -L . -type f -not -path '*/.*' | grep "$grep_pattern" | fzf) $EDITOR $file_path # Go to git toplevel dir (if exists) @@ -25,6 +30,7 @@ function quickedit cd $prev_dir end + abbr -a cdquickedit "cd $QUICKEDIT_DIR" abbr -a ,qe quickedit abbr -a ,ne quickedit |
