redguardtoo / emacs.d

Fast and robust Emacs setup.
http://blog.binchen.org
GNU General Public License v3.0
2.41k stars 616 forks source link

bash completion issue #840

Closed drcxd closed 4 years ago

drcxd commented 4 years ago

When executing shell command inside emacs using SPC-s-c, then typing something like rm and TAB for completion, there is an error and no completion is provided.

The error is apply: Symbol’s function definition is void: my-bash-completion-tokenize. I tried to comment out the code in init-term-mode.el related to this symbol my-bash-competion-tokenize-hack, the completion could work. I am not sure why the function is there, so please check why there is an error.

redguardtoo commented 4 years ago

9442f75b fixed typo (Chen Bin)

drcxd commented 4 years ago

However, the completion does not work correctly. I typed rm and then I pressed TAB to complete, the completions prompted were meaningless in that context. To be specific, it does not list files in the current directory, but something like

l
./
\:
w
la
...
redguardtoo commented 4 years ago

fcd0300c adjust shell completion backend priority (Chen Bin)

drcxd commented 4 years ago

I pulled the latest code, but the issue remains.

redguardtoo commented 4 years ago

That's default behavior of Emacs. Try emacs -Q -nw in shell or start Emacs without this set up. Try M-x shell instead.

drcxd commented 4 years ago

I started emacs with -Q option. Then M-x shell-command. I typed "rm" then pressed TAB. It prompts the list of files in current directory. I think this is the default behavior.

redguardtoo commented 4 years ago

I see. 1604fd54 use native shell completion backend instead 3rd party backend (Chen Bin)