This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GIT heart FZF | |
# ------------- | |
is_in_git_repo() { | |
git rev-parse HEAD > /dev/null 2>&1 | |
} | |
fzf-down() { | |
fzf --height 50% "$@" --border | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# "cd with history" | |
# | |
# Bash has a nice feature called "directory stack" - sort of "location history": | |
# https://www.gnu.org/software/bash/manual/html_node/The-Directory-Stack.html | |
# However, I find the built-in commands not really convenient. This makes the | |
# directory stack available as a sort of extension to `cd` interface. | |
function _cd { | |
# typing just `_cd` will take you $HOME ;) | |
if [ "$1" == "" ]; then |