* eshell: annoying filename completion
@ 2003-03-04 22:07 Barman Brakjoller
2003-03-04 22:27 ` Lucas
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Barman Brakjoller @ 2003-03-04 22:07 UTC (permalink / raw)
Imagine you have this:
~/tmp/esh $ ls
long_file_name.gif
and want to do this
~/tmp/esh $ rm long_<pressing TAB here completes the filename>
That works ok, eshell completes the filename. But what if I want to
rename that file to long_file_name.jpeg? This does not work as I want:
~/tmp/esh $ mv long_<pressing TAB here completes the filename> lo<TAB
again, nothing happens, eshell just beeps at me>
I guess eshell is trying to be smart here, but in this case it is too
smart for my taste... :)
Any variable I might want to customize and any drawbacks?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: eshell: annoying filename completion
2003-03-04 22:07 eshell: annoying filename completion Barman Brakjoller
@ 2003-03-04 22:27 ` Lucas
2003-03-04 22:28 ` John Wiegley
2003-03-05 3:29 ` Unknown
2 siblings, 0 replies; 6+ messages in thread
From: Lucas @ 2003-03-04 22:27 UTC (permalink / raw)
Un beau jour, brakjoller@hotmail.com (Barman Brakjoller) nous a dit:
> Imagine you have this:
>
> ~/tmp/esh $ ls
> long_file_name.gif
>
> and want to do this
>
> ~/tmp/esh $ rm long_<pressing TAB here completes the filename>
>
> That works ok, eshell completes the filename. But what if I want to
> rename that file to long_file_name.jpeg? This does not work as I want:
>
> ~/tmp/esh $ mv long_<pressing TAB here completes the filename> lo<TAB
> again, nothing happens, eshell just beeps at me>
>
> I guess eshell is trying to be smart here, but in this case it is too
> smart for my taste... :)
>
> Any variable I might want to customize and any drawbacks?
Not tested, but a little set-mark before pressing tab, then, when name
is completed, a copy-region-as-kill, then the rest of your line :
~/tmp/esh $ mv long_<pressing TAB here completes the filename> lo
^ ^ ^
set-mark copy-region-as-kill yank
No ? :)
Hope this helps.
--
Lucas
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: eshell: annoying filename completion
2003-03-04 22:07 eshell: annoying filename completion Barman Brakjoller
2003-03-04 22:27 ` Lucas
@ 2003-03-04 22:28 ` John Wiegley
2003-03-05 14:48 ` Barman Brakjoller
2003-03-05 3:29 ` Unknown
2 siblings, 1 reply; 6+ messages in thread
From: John Wiegley @ 2003-03-04 22:28 UTC (permalink / raw)
brakjoller@hotmail.com (Barman Brakjoller) writes:
> That works ok, eshell completes the filename. But what if I want to
> rename that file to long_file_name.jpeg? This does not work as I
> want:
>
> ~/tmp/esh $ mv long_<pressing TAB here completes the filename> lo<TAB
> again, nothing happens, eshell just beeps at me>
>
> I guess eshell is trying to be smart here, but in this case it is too
> smart for my taste... :)
Use C-c C-y to re-insert the final argument of the current line. In
general, Eshell tries not to complete an argument twice, since it is
so rarely what you want to do.
John
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: eshell: annoying filename completion
2003-03-04 22:07 eshell: annoying filename completion Barman Brakjoller
2003-03-04 22:27 ` Lucas
2003-03-04 22:28 ` John Wiegley
@ 2003-03-05 3:29 ` Unknown
2003-03-05 4:03 ` John Wiegley
2 siblings, 1 reply; 6+ messages in thread
From: Unknown @ 2003-03-05 3:29 UTC (permalink / raw)
Barman Brakjoller wrote:
> Imagine you have this:
>
> ~/tmp/esh $ ls
> long_file_name.gif
>
> and want to do this
>
> ~/tmp/esh $ rm long_<pressing TAB here completes the filename>
>
> That works ok, eshell completes the filename. But what if I want to
> rename that file to long_file_name.jpeg? This does not work as I want:
>
> ~/tmp/esh $ mv long_<pressing TAB here completes the filename> lo<TAB
> again, nothing happens, eshell just beeps at me>
>
> I guess eshell is trying to be smart here, but in this case it is too
> smart for my taste... :)
>
> Any variable I might want to customize and any drawbacks?
I don't use eshell much myself, but I know I have to reuse the same filename
all the time, usually slightly modified the second time. So this behaviour
would be too smart for me too. ;)
I don't know if you know about dabbrev, and hippie-expand (the latter is the
superset of the former). I think these can be used to easily do what you
want, and they'll be generally useful in other major modes too.
--
Le
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: eshell: annoying filename completion
2003-03-05 3:29 ` Unknown
@ 2003-03-05 4:03 ` John Wiegley
0 siblings, 0 replies; 6+ messages in thread
From: John Wiegley @ 2003-03-05 4:03 UTC (permalink / raw)
Le Wang <lewang(at@)yahoo.com> writes:
> I don't use eshell much myself, but I know I have to reuse the same
> filename all the time, usually slightly modified the second time.
> So this behaviour would be too smart for me too. ;)
Then set `eshell-cmpl-use-paring' to nil. Then it won't try to
intelligently "pare down" your set of possible completions anymore.
John
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: eshell: annoying filename completion
2003-03-04 22:28 ` John Wiegley
@ 2003-03-05 14:48 ` Barman Brakjoller
0 siblings, 0 replies; 6+ messages in thread
From: Barman Brakjoller @ 2003-03-05 14:48 UTC (permalink / raw)
> > ~/tmp/esh $ mv long_<pressing TAB here completes the filename> lo<TAB
> > again, nothing happens, eshell just beeps at me>
> >
> > I guess eshell is trying to be smart here, but in this case it is too
> > smart for my taste... :)
>
> Use C-c C-y to re-insert the final argument of the current line. In
> general, Eshell tries not to complete an argument twice, since it is
> so rarely what you want to do.
Ahhh, eshell-repeat-argument is exactly what I need, and I can still
have the "intelligent" :) completion enabled. I just have to bind it
to another key and I'll be all Happy happy, joy joy!
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-03-05 14:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-04 22:07 eshell: annoying filename completion Barman Brakjoller
2003-03-04 22:27 ` Lucas
2003-03-04 22:28 ` John Wiegley
2003-03-05 14:48 ` Barman Brakjoller
2003-03-05 3:29 ` Unknown
2003-03-05 4:03 ` John Wiegley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).