aboutsummaryrefslogtreecommitdiff
path: root/.fzfrc
diff options
context:
space:
mode:
Diffstat (limited to '.fzfrc')
-rwxr-xr-x.fzfrc15
1 files changed, 15 insertions, 0 deletions
diff --git a/.fzfrc b/.fzfrc
index 20b4535..0d3b3fa 100755
--- a/.fzfrc
+++ b/.fzfrc
@@ -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/ .*//")
+}