mirror of
https://github.com/theniceboy/.config.git
synced 2025-12-26 14:44:57 +08:00
12 lines
475 B
Text
Executable file
12 lines
475 B
Text
Executable file
### PATH
|
|
# mnemonic: [F]ind [P]ath
|
|
# list directories in $PATH, press [enter] on an entry to list the executables inside.
|
|
# press [escape] to go back to directory listing, [escape] twice to exit completely
|
|
|
|
local loc=$(echo $PATH | sed -e $'s/:/\\\n/g' | eval "fzf ${FZF_DEFAULT_OPTS} --header='[find:path]'")
|
|
|
|
if [[ -d $loc ]]; then
|
|
echo "$(rg --files $loc | rev | cut -d"/" -f1 | rev)" | eval "fzf ${FZF_DEFAULT_OPTS} --header='[find:exe] => ${loc}' >/dev/null"
|
|
fp
|
|
fi
|
|
|