diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2024-05-30 10:23:10 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2024-05-30 10:23:20 +0900 |
| commit | 3afd543a7e1491f26e7831fcb19e83b5fb9ce4ec (patch) | |
| tree | 07b2ea3d13c71698a70279c8b760f5220707007a | |
| parent | b4f2cde5ac6e9d625dc6c5ab4c2dcf291e18f3b3 (diff) | |
| download | fzf-3afd543a7e1491f26e7831fcb19e83b5fb9ce4ec.tar.gz | |
[fish] Use perl instead of sed to strip leading tabs
https://github.com/junegunn/fzf/pull/3807#discussion_r1619520105
| -rw-r--r-- | shell/key-bindings.fish | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/key-bindings.fish b/shell/key-bindings.fish index b39424c2..cc56e3aa 100644 --- a/shell/key-bindings.fish +++ b/shell/key-bindings.fish @@ -70,7 +70,7 @@ function fzf_key_bindings # before 2.4.0. if [ "$FISH_MAJOR" -gt 2 -o \( "$FISH_MAJOR" -eq 2 -a "$FISH_MINOR" -ge 4 \) ]; if type -q perl - history -z --reverse | perl -0 -pe 's/^/$.\t/g; s/\n/\n\t/gm' | eval (__fzfcmd) --tac --read0 --print0 -q '(commandline)' | sed 's/^[0-9]*\t//' | read -lz result + history -z --reverse | perl -0 -pe 's/^/$.\t/g; s/\n/\n\t/gm' | eval (__fzfcmd) --tac --read0 --print0 -q '(commandline)' | perl -pe 's/^\d*\t//' | read -lz result and commandline -- $result else history -z | eval (__fzfcmd) --read0 --print0 -q '(commandline)' | read -lz result |
