|
|
|
@ -4,7 +4,7 @@ if [[ $- == *i* ]]; then
|
|
|
|
|
|
|
|
|
|
# CTRL-T - Paste the selected file path(s) into the command line
|
|
|
|
|
__fsel() {
|
|
|
|
|
local cmd="${FZF_CTRL_T_COMMAND:-"command find -L . \\( -path '*/\\.*' -o -fstype 'dev' -o -fstype 'proc' \\) -prune \
|
|
|
|
|
local cmd="${FZF_CTRL_T_COMMAND:-"command find -L . \\( -path '*/\\.*' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \
|
|
|
|
|
-o -type f -print \
|
|
|
|
|
-o -type d -print \
|
|
|
|
|
-o -type l -print 2> /dev/null | sed 1d | cut -b3-"}"
|
|
|
|
@ -33,7 +33,7 @@ bindkey '^T' fzf-file-widget
|
|
|
|
|
|
|
|
|
|
# ALT-C - cd into the selected directory
|
|
|
|
|
fzf-cd-widget() {
|
|
|
|
|
local cmd="${FZF_ALT_C_COMMAND:-"command find -L . \\( -path '*/\\.*' -o -fstype 'dev' -o -fstype 'proc' \\) -prune \
|
|
|
|
|
local cmd="${FZF_ALT_C_COMMAND:-"command find -L . \\( -path '*/\\.*' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune \
|
|
|
|
|
-o -type d -print 2> /dev/null | sed 1d | cut -b3-"}"
|
|
|
|
|
setopt localoptions pipefail 2> /dev/null
|
|
|
|
|
cd "${$(eval "$cmd | $(__fzfcmd) +m $FZF_ALT_C_OPTS"):-.}"
|
|
|
|
|