#user-defined functions gtp(){ [ -z "$*" ] && commit=$(curl -s "https://raw.githubusercontent.com/ngerakines/commitment/master/commit_messages.txt" | shuf -n1) || commit=$* git add . git commit -m "$commit" git push unset commit } gtb () { [ -z "$*" ] && br=$(git branch -a | fzf --border=rounded --layout=reverse --height=10 | tr -d ' ') || br=$* [ -z "$br" ] || git checkout $br unset br } b64 () { printf "%s" "$1" | base64 $2; } url() { curl -s https://0x0.st -F "file=@$*" | wl-copy && notify-send "Link copied to clipboard"; } gtd () { [ -z "$*" ] && file=$(git diff --name-only | fzf --border=rounded --height=10 --layout=reverse | tr -d ' ') || file=$* [ -z "$file" ] || git diff $file unset file } gtc () { [ -z "$*" ] && [ -p "/dev/stdin" ] && read -r query