diff options
author | Ben Sima <ben@bsima.me> | 2020-11-14 16:11:13 -0500 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2020-11-14 16:11:13 -0500 |
commit | eff60844c7e589b81fe4c83901f35fee71aefdc6 (patch) | |
tree | 2db2471a4017caefeadfa79ce496e2fc5233b84b | |
parent | d34e1333a00af23be73ca65ee7a8ac07f7d4c935 (diff) |
add v and edit
-rwxr-xr-x | edit | 2 | ||||
-rwxr-xr-x | v | 9 |
2 files changed, 11 insertions, 0 deletions
@@ -0,0 +1,2 @@ +#!/usr/bin/env bash +exec vim "$@" @@ -0,0 +1,9 @@ +if [[ -d $1 ]] +then + rg --files $1 | fzf | xargs edit +elif [[ -f $1 ]] +then + edit $1 +else + rg --files . | fzf | xargs edit +fi |