* shell-mode command completion with slashes
@ 2008-10-30 16:57 Barry Margolin
2008-10-30 19:48 ` Stephen Berman
[not found] ` <mailman.2518.1225396148.25473.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 3+ messages in thread
From: Barry Margolin @ 2008-10-30 16:57 UTC (permalink / raw)
To: help-gnu-emacs
I'm running Emacs 22.2.50 on OS X 10.5.5, and I use shell mode
extensively. I don't have "." in my $PATH, so if I want to run a
program in the current directory I need to type "./program-name". I'd
like to be able to type "./prog<TAB>" and have it complete it, but it
doesn't. I looked at the source code of shell-dynamic-complete-command,
and it explicitly checks for "~" or "/" in the word being completed, and
gives up. And shell-dynamic-complete-filename gives up if it's being
used for the first word of a command, it only works for arguments.
This used to work, probably before I upgraded from 22.1 to 22.2. Anyone
know how to get the old behavior back? Did it use
comint-dynamic-complete-filename instead of
shell-dynamic-complete-filename? The former doesn't check for the
location in the command, but it also doesn't care whether the file it
completes to is an executable.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: shell-mode command completion with slashes
2008-10-30 16:57 shell-mode command completion with slashes Barry Margolin
@ 2008-10-30 19:48 ` Stephen Berman
[not found] ` <mailman.2518.1225396148.25473.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 3+ messages in thread
From: Stephen Berman @ 2008-10-30 19:48 UTC (permalink / raw)
To: help-gnu-emacs
On Thu, 30 Oct 2008 12:57:22 -0400 Barry Margolin <barmar@alum.mit.edu> wrote:
> I'm running Emacs 22.2.50 on OS X 10.5.5, and I use shell mode
> extensively. I don't have "." in my $PATH, so if I want to run a
> program in the current directory I need to type "./program-name". I'd
> like to be able to type "./prog<TAB>" and have it complete it, but it
> doesn't. I looked at the source code of shell-dynamic-complete-command,
> and it explicitly checks for "~" or "/" in the word being completed, and
> gives up. And shell-dynamic-complete-filename gives up if it's being
> used for the first word of a command, it only works for arguments.
>
> This used to work, probably before I upgraded from 22.1 to 22.2. Anyone
> know how to get the old behavior back? Did it use
> comint-dynamic-complete-filename instead of
> shell-dynamic-complete-filename? The former doesn't check for the
> location in the command, but it also doesn't care whether the file it
> completes to is an executable.
This was caused by this change:
2008-04-03 Chong Yidong <cyd@stupidchicken.com>
* shell.el (shell-dynamic-complete-filename): New fun.
(shell-dynamic-complete-functions): Use it.
This was after the release of 22.2 but backported. It was fixed by this
change:
2008-07-23 Chong Yidong <cyd@stupidchicken.com>
* shell.el (shell-dynamic-complete-functions):
Use comint-dynamic-complete-filename as well (bug#361).
and that is in 22.3.
Steve Berman
^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <mailman.2518.1225396148.25473.help-gnu-emacs@gnu.org>]
* Re: shell-mode command completion with slashes
[not found] ` <mailman.2518.1225396148.25473.help-gnu-emacs@gnu.org>
@ 2008-10-31 1:56 ` Barry Margolin
0 siblings, 0 replies; 3+ messages in thread
From: Barry Margolin @ 2008-10-31 1:56 UTC (permalink / raw)
To: help-gnu-emacs
In article <mailman.2518.1225396148.25473.help-gnu-emacs@gnu.org>,
Stephen Berman <stephen.berman@gmx.net> wrote:
> On Thu, 30 Oct 2008 12:57:22 -0400 Barry Margolin <barmar@alum.mit.edu> wrote:
>
> > I'm running Emacs 22.2.50 on OS X 10.5.5, and I use shell mode
> > extensively. I don't have "." in my $PATH, so if I want to run a
> > program in the current directory I need to type "./program-name". I'd
> > like to be able to type "./prog<TAB>" and have it complete it, but it
> > doesn't. I looked at the source code of shell-dynamic-complete-command,
> > and it explicitly checks for "~" or "/" in the word being completed, and
> > gives up. And shell-dynamic-complete-filename gives up if it's being
> > used for the first word of a command, it only works for arguments.
> >
> > This used to work, probably before I upgraded from 22.1 to 22.2. Anyone
> > know how to get the old behavior back? Did it use
> > comint-dynamic-complete-filename instead of
> > shell-dynamic-complete-filename? The former doesn't check for the
> > location in the command, but it also doesn't care whether the file it
> > completes to is an executable.
>
> This was caused by this change:
>
> 2008-04-03 Chong Yidong <cyd@stupidchicken.com>
>
> * shell.el (shell-dynamic-complete-filename): New fun.
> (shell-dynamic-complete-functions): Use it.
>
> This was after the release of 22.2 but backported. It was fixed by this
> change:
>
> 2008-07-23 Chong Yidong <cyd@stupidchicken.com>
>
> * shell.el (shell-dynamic-complete-functions):
> Use comint-dynamic-complete-filename as well (bug#361).
>
> and that is in 22.3.
So it will include all files in the completion, not just executables.
It also seems to make shell-dynamic-complete-filename redundant, since
it's basically the same as comint-dynamic-complete-filename except that
it will not expand the first word of a command.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-10-31 1:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-30 16:57 shell-mode command completion with slashes Barry Margolin
2008-10-30 19:48 ` Stephen Berman
[not found] ` <mailman.2518.1225396148.25473.help-gnu-emacs@gnu.org>
2008-10-31 1:56 ` Barry Margolin
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.