From 1a283214396bab1911efc63201451d3b3eac047c Mon Sep 17 00:00:00 2001 From: Raine Virta Date: Sun, 10 May 2015 15:59:52 +0300 Subject: [PATCH] add fc --- Examples.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Examples.md b/Examples.md index 9df7ec0..7f4e051 100644 --- a/Examples.md +++ b/Examples.md @@ -180,6 +180,17 @@ fshow() { } ``` +```sh +# fc - get git commit sha +# example usage: git rebase -i `fc` +fc() { + local commits commit + commits=$(git log --color=always --pretty=oneline --abbrev-commit --reverse) && + commit=$(echo "$commits" | fzf --tac +s +m -e --ansi --reverse) && + echo -n $(echo "$commit" | sed "s/ .*//") +} +``` + ### Tags ```sh