mirror of
https://github.com/GRFreire/dotfiles.git
synced 2026-01-10 04:19:38 +00:00
zsh: fix config edit alias
config files path were always relative to $HOME if pwd was above that path (eg: /)
This commit is contained in:
parent
2a80c502b5
commit
b2ca0dfa4e
2
.zshrc
2
.zshrc
@ -31,7 +31,7 @@ zinit light zsh-users/zsh-completions
|
|||||||
alias config="git --git-dir=\$HOME/.dotfiles/ --work-tree=\$HOME"
|
alias config="git --git-dir=\$HOME/.dotfiles/ --work-tree=\$HOME"
|
||||||
|
|
||||||
# Config/scripts Edit
|
# Config/scripts Edit
|
||||||
alias ce="echo \"\$(/bin/ls \$HOME/.scripts/bin | sed \"s|^|\$(realpath \$HOME/.scripts/bin/ --relative-to=.)/|\")\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"
|
alias ce="echo \"\$(/bin/ls \$HOME/.scripts/bin | sed \"s|^|\$(realpath \$HOME/.scripts/bin/ --relative-to=.)/|\")\n\$((cd \$HOME && config ls-tree -r master --name-only \$HOME) | sed \"s|^|\$(realpath \$HOME --relative-to=.)/|\" | sed 's|^\./||')\" | 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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user