From b03263718cd9eb43b21b71fea4d002464e6d52f5 Mon Sep 17 00:00:00 2001 From: Jamie Schembri Date: Sun, 30 Oct 2016 10:55:10 +0100 Subject: [PATCH] Add fco, fssh (tested on OSX) --- Examples-(fish).md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Examples-(fish).md b/Examples-(fish).md index a98742f..e0bcc54 100644 --- a/Examples-(fish).md +++ b/Examples-(fish).md @@ -1,2 +1,17 @@ Examples for fish shell ------------------------ \ No newline at end of file +----------------------- + +### Git + +``` +function fco -d "Fuzzy-find and checkout a branch" + git branch --all | grep -v HEAD | string trim | fzf | xargs git checkout +end +``` + +### SSH +``` +function fssh -d "Fuzzy-find ssh host and ssh into it" + ag '^host [^*]' ~/.ssh/config | cut -d ' ' -f 2 | fzf | xargs -o ssh +end +``` \ No newline at end of file