1 2 3 4 5 6 7 8 9 10 11 12
if [[ -d $1 ]] then rg --files $1 | fzf | xargs edit elif [[ -f $1 ]] then edit $1 elif [[ ! -z $1 ]] then edit $1 else rg --files . | fzf | xargs edit fi