[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
dabbrev-expand behavior
From: |
Dan Nicolaescu |
Subject: |
dabbrev-expand behavior |
Date: |
Wed, 14 Jan 2009 07:49:43 -0800 (PST) |
Hi,
Thanks for implementing dabbrev-expand in bash-4.0!
Unfortunately the behavior is not consistent with what dabbrev-expand
does in Emacs (and tcsh), so it will be quite confusing for users to
use.
Doing
# bind dabbrev-expand to it's canonical key:
$ bind '"\M-/":dabbrev-expand'
# Now run a few dummy commands to have stuff in history:
$ foa
$ fob
$ foo
# try using dabbrev-expand
$ fo
# now type M-/
# This will display:
$ fo
foa fob foo
$ foa
# Note that there's a space after "foa" and that all the possibilities
# are displayed.
This is not how dabbrev-expand normally works, it should not insert the
extra space, nor should it show all the possibilities.
For one thing the extra space is confusing: say you also have "foaa" in
history, it's hard to guess that pressing M-/ again after seeing "foa "
will result in "foaa " being inserted.
When you have a lot of history, displaying the matches is not very
useful, there can be hundreds of them. Just display a match and one can
quickly cycle through them by repeatedly pressing M-/. The matches
should be in history order, the most recent ones should be first, the
older ones should follow.
- dabbrev-expand behavior,
Dan Nicolaescu <=