-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Examples (fish)
Jamie Schembri edited this page Oct 30, 2016
·
27 revisions
function fco -d "Fuzzy-find and checkout a branch"
git branch --all | grep -v HEAD | string trim | fzf | xargs git checkout
end
function fcoc -d "Fuzzy-find and checkout a commit"
git log --pretty=oneline --abbrev-commit --reverse | fzf +s | xargs git checkout
end
function fssh -d "Fuzzy-find ssh host and ssh into it"
ag '^host [^*]' ~/.ssh/config | cut -d ' ' -f 2 | fzf | xargs -o ssh
end
function fpass -d "Fuzzy-find a Lastpass entry and copy the password"
lpass ls | fzf | string replace -r -a '.+\[id: (\d+)\]' '$1' | xargs lpass show -c --password
end