jangko / nim-noise

Nim implementation of linenoise command line editor
MIT License
60 stars 11 forks source link

Add option to use Emacs behaviour for case editing commands #28

Open xoich opened 1 year ago

xoich commented 1 year ago

Hello, in Emacs, but also GNU readline, bash and other shell the case editing behavior is different than used here. In Emacs when you press one of these keys inside a word, only the characters up to the end of the word are affected, so if | is the cursor, and you are in this situation foo|bar and then you press M-C in the shell you get fooBar, with noise instead you get Foobar. This is the same for the other case commands.

I think there should be a compiler option to enable classic behavior.

xoich commented 1 year ago

hi @jangko I can try to make the changes myself if you want. Let me know how you want to proceed, there are three options:

  1. remove the current behavior and leave only Emacs' one (as I did in #29)
  2. make Emacs behavior the default and keep the current one as an option
  3. leave the current as default and make Emacs behavior as an option
jangko commented 1 year ago

I prefer the 3rd option

xoich commented 1 year ago

ok, I created #30 for that.