reedline icon indicating copy to clipboard operation
reedline copied to clipboard

Open current line in editor with ctrl+x e

Open matiu2 opened this issue 2 years ago • 1 comments

Related problem

In bash and zsh you can hit ctrl+x e to open the current line in $EDITOR as shown here

Could we please add this to nushell ?

It would be especially handy with long / multiline commands.

After you save it, it should update the current prompt, but not run it straight away, you'd have to hit enter again to run it.

Many Thanks

Describe the solution you'd like

  1. Hit ctrl+x e on the keyboard.
  2. The current command line contents (including multiline) is opened in $EDITOR
  3. In the editor the user edits the lines, saves and exits
  4. The command line contents is updated
  5. The user still has the chance to hit either enter to execute it, or ctrl+c to abort

Describe alternatives you've considered

No response

Additional context and details

No response

matiu2 avatar Nov 01 '23 23:11 matiu2

ctrl+o does this now. I don't think reedline supports key binding chords like ctrl+x e yet. Moving to the reedline repo as a change will have to happen here I believe.

fdncred avatar Nov 02 '23 00:11 fdncred