[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-readline] transpose-words doesn't DWIM when there's command line op
From: |
Bradley M. Kuhn |
Subject: |
[Bug-readline] transpose-words doesn't DWIM when there's command line options. |
Date: |
Thu, 06 Sep 2012 13:47:05 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Sorry if this has been discussed before.
Readline "transpose-word" in Bash acts just like Emacs', which means
this is not really a bug, but I have always been annoyed by this
behavior on the command line:
$ git -b checkout a b
^ cursor here; hit M-t (transpose-word), you get:
$ git -checkout b a b
Of course, that's not really DWIM'ing, even though it's acting the same
way Emacs does.
I presume a change in this behavior would annoy people who are used to
it, and plus vary us from Emacs.
I notice the reason it works this way is that rl_transpose_words() calls
rl_forward_word() which uses rl_alphabetic() to find begin/end of word.
This would be easily changed, but I am not proposing a patch because it
would clearly break backward compatibility.
Would an rl_transpose_words_by_whitespace() be a preferred solution?
Folks like me could then just remap M-t to that instead.
--
-- bkuhn
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-readline] transpose-words doesn't DWIM when there's command line options.,
Bradley M. Kuhn <=