Closed waciumawanjohi closed 2 years ago
Hello, the zsh function already includes -e
. When you type tre
in the shell, it's actually calling the function, which then calls the actual tre
command. Long story short, you don't need to include -e vim
when you use tre
in command line.
If you don't have your EDITOR environment variable set to vim
already, you can replace the shell config with
tre() { command tre "$@" -e vim && source "/tmp/tre_aliases_$USER" 2>/dev/null; }
(note the vim
part after -e
)
... to ensure Vim is in the alias.
Running tre with the -e flag produces an error.
Setup
Mac OS Monterey zsh shell oh-my-zsh installed tre installed via brew
brew install tre-command
.zshrc includes the following lineCommand
Expected
Command exits successfully Running the command
gives the result
Actual
Command exits with code
2
Stderr output:No alias created