Skip to content

Instantly share code, notes, and snippets.

@tai2
Last active April 2, 2022 03:08
Show Gist options
  • Save tai2/f391d9cb3944675f7afe9d0f598765a2 to your computer and use it in GitHub Desktop.
Save tai2/f391d9cb3944675f7afe9d0f598765a2 to your computer and use it in GitHub Desktop.
Shell utilities
function zcd() {
cd $(z | tail -r | fzf --layout=reverse --cycle | awk "{print \$2}")
}
function ge() {
FILE=`git grep "$@" | fzf --layout=reverse --cycle | cut -d : -f 1`
nvr --remote $FILE
}
function gt() {
FILE=`git grep "$@" | fzf --layout=reverse --cycle | cut -d : -f 1`
nvr --remote-tab $FILE
}
function fe() {
FILE=`find . -name "$1" | fzf --layout=reverse --cycle`
nvr --remote $FILE
}
function ft() {
FILE=`find . -name "$1" | fzf --layout=reverse --cycle`
nvr --remote-tab $FILE
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment