mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-18 16:45:38 -05:00
add fc
11
Examples.md
11
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
|
||||
|
||||
Reference in New Issue
Block a user