Let's say I have a file called
.alias in my
$HOME directory with the following content:
alias "my-first-alias"="ls -lha"
alias "my-second-alias="echo 'Hello World'"
I know that if put the line
source "$HOME/.alias" in both my
.zshrc files I'll be able to create aliases on these shells at the same time in a single file, just so I don't have to manually copy one alias that I have just created in .bashrc to .zshrc...
So far everything is fine... The problem starts with
eshell, its alias syntax is different, the last two aliases in
eshell syntax would be the following:
alias my-first-alias 'ls -lha'
alias my-second-alias 'echo "Hello World"'
Since its syntax is different I can't just source my
.alias file for
eshell, I wouldn't like to manually translate my aliases for the eshell syntax all the times that I create a new alias. Is there any standard way of solving problems like this on emacs? Or should I be thinking about how to create a script that will translate my bash aliases to eshell aliases for sourcing it?