fzf: strip './' prefix from fd output
This commit is contained in:
parent
bb612ef229
commit
e44a2e1a70
@ -1,10 +1,10 @@
|
|||||||
# https://github.com/junegunn/fzf
|
# https://github.com/junegunn/fzf
|
||||||
set -gx FZF_DEFAULT_OPTS "--no-height --layout=reverse"
|
set -gx FZF_DEFAULT_OPTS '--layout=reverse'
|
||||||
set -gx FZF_DEFAULT_COMMAND "fd --type=file"
|
set -gx FZF_DEFAULT_COMMAND 'fd --type=file'
|
||||||
|
|
||||||
function __fzf_files
|
function __fzf_files
|
||||||
set -l output (
|
set -l output (
|
||||||
fd --type=file --hidden --follow --color=always --exclude=.git 2>/dev/null |
|
fd --type=file --hidden --follow --color=always --exclude=.git --strip-cwd-prefix 2>/dev/null |
|
||||||
fzf --ansi --preview='bat --style=numbers --color=always {}' --preview-window='right:70%:hidden:wrap' --bind='?:toggle-preview' --expect='ctrl-e' --header='ctrl-e to edit, ? to preview'
|
fzf --ansi --preview='bat --style=numbers --color=always {}' --preview-window='right:70%:hidden:wrap' --bind='?:toggle-preview' --expect='ctrl-e' --header='ctrl-e to edit, ? to preview'
|
||||||
)
|
)
|
||||||
set -l key $output[1]
|
set -l key $output[1]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user