diff options
Diffstat (limited to '.fzfrc')
-rwxr-xr-x | .fzfrc | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -64,3 +64,18 @@ tm() { session=$(tmux list-sessions -F "#{session_name}" 2>/dev/null | fzf --exit-0) && tmux $change -t "$session" || echo "No sessions found." } +if command -v jrnl > /dev/null; then + fjrnl () { + title=$(jrnl --short | fzf --tac --no-sort) && + jrnl -on "$(echo $title | cut -c 1-16)" $1 + } +fi + +# fcs - get git commit sha +# example usage: git rebase -i `fcs` +fcs() { + 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/ .*//") +} |