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