Evaluate aliases at runtime (#1456)

This commit is contained in:
Alessio Artoni 2025-03-06 22:47:02 +01:00 committed by GitHub
parent 1e750084e5
commit 70ee0fe03f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,9 +4,9 @@
[ -x "$(command -v nvim)" ] && alias vim="nvim" vimdiff="nvim -d"
# Use $XINITRC variable if file exists.
[ -f "$XINITRC" ] && alias startx="startx $XINITRC"
[ -f "$XINITRC" ] && alias startx='startx $XINITRC'
[ -f "$MBSYNCRC" ] && alias mbsync="mbsync -c $MBSYNCRC"
[ -f "$MBSYNCRC" ] && alias mbsync='mbsync -c $MBSYNCRC'
# sudo not required for some system commands
for command in mount umount sv pacman updatedb su shutdown poweroff reboot ; do
@ -47,8 +47,8 @@ alias \
trem="transmission-remote" \
YT="youtube-viewer" \
sdn="shutdown -h now" \
e="$EDITOR" \
v="$EDITOR" \
e='$EDITOR' \
v='$EDITOR' \
p="pacman" \
xi="sudo xbps-install" \
xr="sudo xbps-remove -R" \
@ -58,4 +58,4 @@ alias \
alias \
lf="lfub" \
magit="nvim -c MagitOnly" \
ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutenvrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc"
ref='shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutenvrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc'