zsh and rc file abstract
[dotfiles.git] / Scripts / fzfutil
1 #!/bin/sh
2
3 fuzzy_dirs="$HOME/Scripts/* $HOME/School/* $HOME/.vim/mysnippets/* $HOME/.bashrc $HOME/.xinitrc $HOME/.Xresources $HOME/.Xmodmap $HOME/.config/* $HOME/Repos/* $HOME/Installs/*"
4
5 fvi() { 
6     [ -z "$1" ] && search="$fuzzy_dirs" || search="$1"
7     fname="$(find $search -type f | fzf)"
8     [ -z "$fname" ] || $EDITOR "$fname"
9 }
10 fcd() {
11     [ -z "$1" ] && search="$fuzzy_dirs" || search="$1"
12     dname="$(find $search -type d | fzf)"
13     [ -z "$dname" ] || cd "$dname"
14 }