help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is TAB-completion in shell not working for some commands?


From: Marius Hofert
Subject: Re: Why is TAB-completion in shell not working for some commands?
Date: Wed, 9 Nov 2011 08:54:23 +0100

I just figured out that if I start emacs from the Mac's terminal (via "emacs" 
which starts /Applications/Emacs.app/Contents/MacOS/Emacs) and open an emacs 
shell with M-x shell, I can tab-complete a2ps. 

Hmmm... so the GUI version seems to act weird...
 

On 2011-11-09, at 08:45 , Marius Hofert wrote:

>> 
>> so you have completion at least in this shell (?)
>> 
> 
> Not for a2ps for example, only for other commands (as I wrote in the 
> beginning). 
> 
> If I type a2p + TAB in the Mac's terminal, I get:
> a2p       a2p-5.12  a2p5.10   a2p5.12   a2ping    a2ps 
> 
> The same in the emacs shell:
> Possible completions are:
> a2p   a2p5.10
> a2p5.12       a2ping
> 
> => a2p-5.12 and a2ps are missing [although I can execute, e.g., a2ps].
> I can also use which a2ps in the emacs shell and correctly obtain:
> /opt/local/bin/a2ps
> Also, both PATHs are the same (in the terminal and in the emacs shell).
> 
> I installed a2ps via Macports (package manager) and it correctly put in the 
> /opt/local/bin path to PATH.
> 
> echo $PATH
> /Applications/Emacs.app/Contents/MacOS/:/Applications/Emacs.app/Contents/MacOS/bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/texbin:/opt/local/bin:/opt/local/sbin
>  
> 
> The only thing I did was:
> 
> Macports defines the following line in .profile:
> export PATH=$PATH:/opt/local/bin:/opt/local/sbin
> 
> I just added the following to .profile:
> export 
> PATH=/Applications/Emacs.app/Contents/MacOS/:/Applications/Emacs.app/Contents/MacOS/bin/:$PATH
> The reason for this is that with /Applications/Emacs.app... in the beginning 
> of PATH, I can type "emacs" in the terminal and start the same emacs as I 
> installed (the GUI version), not the very old emacs that natively comes with 
> Mac OS and that is /user/bin/emacs
> 
> The main problem is that I can't figure out which commands work with TAB 
> completion and which don't. If not all work as in the terminal and if I don't 
> know which work, this is quite tedious to work with (because one assumes that 
> the command one is trying to complete is not installed etc.)
> 
> Cheers,
> 
> Marius
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]