case $1 in
(find)
- find . -mindepth 1 -path "*/.git" -prune -o \
+ bfs . -mindepth 1 \
+ -path "*/.git" -prune -o \
+ -path "*/.redo" -prune -o \
\( -type f -o -type d -o -type l \) -print |
cut -c3- | fzf -m --preview="less -N -S {}" |
while read fn ; do print ${(q)fn} ; done > $tmp
alias mc="mc --nomouse"
f() {
- find . -name "*$1*" -print
+ bfs . -name "*$1*" -print
}
alias ssh="TERM=xterm ssh"
# fzf {{{
cf() {
- local dir=$(find -L ${1:-.} -mindepth 1 -path "*/\.git" -prune -o -type d -print |
- fzf --height 40% --reverse --preview="tree -CN {}")
+ local dir=$(bfs -L ${1:-.} -mindepth 1 \
+ -path "*/\.git" -prune -o \
+ -path "*/\.redo" -prune -o \
+ -type d -print 2>/dev/null |
+ fzf --height 40% --reverse --preview="tree -CN {}")
[[ -z $dir ]] || { print -s cd $dir ; cd $dir }
}
# }}}