zsh: add scripts to the ce fzf

This commit is contained in:
Guilherme Rugai Freire 2021-08-14 11:01:35 -03:00
parent 97ae5b1d76
commit c271faee6b
No known key found for this signature in database
GPG Key ID: 0F9FE41723A8A297

4
.zshrc
View File

@ -28,8 +28,8 @@ zinit light zsh-users/zsh-completions
# Alias config to manage dotfiles with git # Alias config to manage dotfiles with git
alias config="git --git-dir=\$HOME/.dotfiles/ --work-tree=\$HOME" alias config="git --git-dir=\$HOME/.dotfiles/ --work-tree=\$HOME"
# Config Edit # Config/scripts Edit
alias ce="config ls-tree -r master --name-only \$HOME | fzf --info=inline --prompt='Select a file: ' --preview='bat --paging=never --style=plain --color=always {}' | xargs -r \$EDITOR" alias ce="echo \"\$(git --git-dir=\$HOME/.scripts/.git ls-tree -r master --name-only bin | sed 's|^|.scripts/|')\n\$(config ls-tree -r master --name-only \$HOME)\" | fzf --info=inline --prompt='Select a file: ' --preview='bat --paging=never --style=plain --color=always {}' | xargs -r \$EDITOR"
bindkey -s '^e' 'ce\n' bindkey -s '^e' 'ce\n'
# Alias for python3 # Alias for python3