Migrate to chezmoi
Move config files from config to chezmoi Add script to auto install packages with DNF and Cargo
This commit is contained in:
parent
110e0882c6
commit
224c7ed45c
1654 changed files with 470035 additions and 51 deletions
49
chezmoi/dot_config/fzf/forgitrc
Normal file
49
chezmoi/dot_config/fzf/forgitrc
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
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 #<Alt-G+Alt-L>
|
||||
|
||||
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}\")'
|
||||
"
|
||||
Loading…
Add table
Add a link
Reference in a new issue