Eshell aliasing doesn't persist

What happened?

using alias "var" "do the thing" should automatically persist the alias into eshell-aliases-file, however the file (/home/user/.config/doom/eshell/aliases) is empty and, in fact, isn’t created.

(set-eshell-alias! "var" "do the thing" "otherVar" "do the other thing) also works and has been recommended on reddit, and to persist it, I’ve appended it to ~/.config/doom/config.el, however there’re issues:

  1. it pollutes alias list by “doubleposting” aliases - they appear in the list of aliases twice.
  2. it requires me to pass (set-eshell-alias!) in every new eshell buffer

How do I start every eshell buffer with aliases enabled and preferably without polluting the buffer with aliases list?

What did you expect to happen?

Passing alias or (set-eshell-alias!) should persist aliases with no further actions necessary.

Steps to reproduce

  1. make an alias with alias [..] or with (set-eshell-alias!)
  2. start a new eshell buffer
  3. alias doesn’t work. with (set-eshell-alias!), one has to pass it to enable aliases, printing all aliases as a side-effect.

System information


Loading data dump...