[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: EShell Alias for a 'cd' followed by 'ls'
From: |
Michael Heerdegen |
Subject: |
Re: EShell Alias for a 'cd' followed by 'ls' |
Date: |
Thu, 19 Nov 2020 22:19:12 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Christopher Dimech <dimech@gmx.com> writes:
> The only caveat is that the aliases will go into an
> official release and cannot require users to type them.
I'm not an Eshell expert, but AFAIK `eshell/alias' is the corresponding
Elisp function.
So for example this would work:
#+begin_src emacs-lisp
(add-hook 'eshell-mode-hook
(defun my-eshell-add-aliases ()
(cl-loop
for alias in
'(("mkcd" "mkdir $1; cd $1")
;;...
)
do (apply 'eshell/alias alias))))
#+end_src
That modifies the alias save file as side effect.
The aliases are stored in the variable `eshell-command-aliases-list'.
That variable doesn't seem to be intended to be modified directly,
though.
Michael.
- Re: EShell Alias for a 'cd' followed by 'ls', (continued)
- Re: EShell Alias for a 'cd' followed by 'ls', Stefan Kangas, 2020/11/18
- Re: EShell Alias for a 'cd' followed by 'ls', Christopher Dimech, 2020/11/18
- Re: EShell Alias for a 'cd' followed by 'ls', Dan Hitt, 2020/11/18
- Re: EShell Alias for a 'cd' followed by 'ls', Dan Hitt, 2020/11/18
- Re: EShell Alias for a 'cd' followed by 'ls', Christopher Dimech, 2020/11/19
- Re: EShell Alias for a 'cd' followed by 'ls', Dan Hitt, 2020/11/19
- Re: EShell Alias for a 'cd' followed by 'ls', Jean Louis, 2020/11/19
- Re: EShell Alias for a 'cd' followed by 'ls', Christopher Dimech, 2020/11/19
- Re: EShell Alias for a 'cd' followed by 'ls', Dan Hitt, 2020/11/19
- Re: EShell Alias for a 'cd' followed by 'ls', Christopher Dimech, 2020/11/19
- Re: EShell Alias for a 'cd' followed by 'ls',
Michael Heerdegen <=
Re: EShell Alias for a 'cd' followed by 'ls', Jean Louis, 2020/11/18
Re: EShell Alias for a 'cd' followed by 'ls', Vladimir Sedach, 2020/11/19