m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 16:45:38 -05:00

add fc

Raine Virta
2015-05-10 15:59:52 +03:00
parent 959cd0cf3f
commit 1a28321439

@@ -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