forgit-list-command-widget() { local cmd=$(alias | grep 'forgit' | sed -E 's/::/ /g; s/=/ :- /g; s/for//g' | \ awk -v BLD=${BLD} -v RST=${RST} -v BLU=${BLU} -v CYN=${CYN} -F":" '{print BLU BLD $1 RST ":" CYN $2 RST }' | \ column -ts":") LBUFFER="$LBUFFER$( \ fzf-tmux -p -w 30% -h 53% --preview-window=hidden --prompt=' List > ' \ --header=$'Alias\t Description' <<< "$cmd" | awk '{print $1}')" if [[ -n $LBUFFER ]]; then zle accept-line fi zle reset-prompt } zle -N forgit-list-command-widget bindkey '^[g^[l' forgit-list-command-widget # export FORGIT_FZF_SHOW_HELP_OPTS="$( cat <<-EOF Forgit Commands (Aliases) fga add fgbl blame fgbd branch delete fgcb checkout branch fgco checkout commit fgcf checkout file fgct checkout tag fgcp cherry pick fgclean clean fgd diff fgfu fixup fgi ignore fglo log fgrb rebase fgrh reset head fgrev revert commit fgsta stash push fgsts stash show EOF )" export FORGIT_FZF_DEFAULT_OPTS=" --cycle --reverse --height '80%' --preview-window=nohidden --bind 'alt-?:preview(printf \"${FORGIT_FZF_SHOW_HELP_OPTS}\")' "