-
I like to maintain a command-line history with absolute file and directory paths (i.e.. I'm interested in hearing how others would go about this. I'd rather not override the fzf widgets code, unless entirely necessary. Any hidden options or less invasive workarounds, perhaps? Many thanks. |
Beta Was this translation helpful? Give feedback.
Answered by
lime-desu
May 26, 2023
Replies: 1 comment 1 reply
-
You can set it on your environment variables,
if command -v fd >/dev/null 2>&1; then
export FZF_DEFAULT_COMMAND="fd --absolute-path --color=always --hidden --exclude .git"
else
export FZF_DEFAULT_COMMAND="find ~+ -type f \! \( -path '*/.git' -prune \) -printf '%P\n'"
fi
export FZF_CTRL_T_OPTS="--bind 'enter:execute(echo $PWD/{$BUFFER})+abort'" |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
yrammos
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can set it on your environment variables,
If you're using fd, there's this
--absolute-path
flag e.g:Now on the
Ctrl-t
widget pressing enter would append the $PWD/{selected line buffer}