From 0117953a7df0b20f8b11e618c6746f3301e849cb Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Fri, 1 Mar 2024 01:08:26 -0600 Subject: [PATCH] refactor(zsh): change `e` alias to a function This allows the `e` function to pickup the EDITOR var at runtime --- dots/.config/zsh/config/profile/profile/aliases.zsh | 1 - dots/.config/zsh/config/profile/profile/functions.zsh | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/dots/.config/zsh/config/profile/profile/aliases.zsh b/dots/.config/zsh/config/profile/profile/aliases.zsh index 05996ae3..a01609b9 100644 --- a/dots/.config/zsh/config/profile/profile/aliases.zsh +++ b/dots/.config/zsh/config/profile/profile/aliases.zsh @@ -73,7 +73,6 @@ if command -v wezterm >/dev/null 2>&1; then fi ### Misc ### -alias e="${EDITOR}" alias Get-Public-IPV4="dig @resolver4.opendns.com myip.opendns.com +short -4" alias Get-Public-IPV6="dig @resolver1.ipv6-sandbox.opendns.com AAAA myip.opendns.com +short -6" alias cv="command -v" diff --git a/dots/.config/zsh/config/profile/profile/functions.zsh b/dots/.config/zsh/config/profile/profile/functions.zsh index 9d8b15f8..7e688146 100644 --- a/dots/.config/zsh/config/profile/profile/functions.zsh +++ b/dots/.config/zsh/config/profile/profile/functions.zsh @@ -182,3 +182,8 @@ precmd() { preexec() { echo "\x1b]0;${2}\x1b\\" } + +# Editor with single letter +e() { + eval "${EDITOR} ${@}" +}