I use the emacs shell-mode more and more, and there's something that I wish could be improved: the completion when changing directory. I'd love to use ido
or projectile-find-dir
for that.
My workflow
As of today I do all I can outside of emacs' shell, to use the power of emacs as much as possible (visiting files with ido, finding files in project with projectile
, exploring the tree inside dired,…).
I don't cd that often. When I work in a different project I open up another shell buffer. But when I have to, I really miss ido or the fasd shell utility (which works, but without its completion interface which is great with zsh, and which isn't as powerfull as the use of ido could be https://github.com/clvv/fasd).
How to wire that in elisp ?
I know we can give a list to ido-completing-read
;
In the shell, typing cd ../<TAB>
opens up a new *Completions* buffer. It uses comint-dynamic-completion
, but how to get that list in an elisp list, not in a buffer ?
- is it possible to wire that completions list into ido ? (or projectile or helm or whatever)
- I would appreciate too if you link me to accurate documentation (there's a lot, it's difficult to know what's useful for me)
- or does a solution exist yet ?
Thanks !
edit: here is another nice way to cd to recently visited directories, with the fasd utility and ido completion: https://gitlab.com/emacs-stuff/fasd-shell/blob/master/README.org
See another SO question.
ps: eshell doesn't work well with some shell scripts, I'd like to stay in shell-mode.