fuzzy finder menu to select config to edit

This commit is contained in:
Guilherme Rugai Freire 2021-08-13 15:48:18 -03:00
parent 4ecf4e8188
commit 566b0efa24
No known key found for this signature in database
GPG Key ID: 0F9FE41723A8A297
2 changed files with 7 additions and 0 deletions

View File

@ -31,6 +31,9 @@ try_export_path $HOME/.yarn/bin
try_export_path $HOME/.cargo/bin
# Fzf options
export FZF_DEFAULT_OPTS="--reverse --cycle --margin 0,1"
# Android Studio
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64
export ANDROID_HOME=$HOME/Android/Sdk

4
.zshrc
View File

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