You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, that's extremely tedious to create "out of the box" with Nushell/Reedline at the moment, since a Enter only creates a newline in this case if there's a trailing pipe character on the existing line. E.g.:
ls | + Enter will create a newline which can be followed by the next expression, but
ls + Enter executes the command (as it should - I'm not advocating for that to change ;-).
In order to create the "wall of pipes", you have to start with the first form ls |, hit Enter , then continue your | pipeline, and then (if you're pedantic) remove the trailing pipe from the previous line. You could also do something like start the pipeline with a ( open-paran to keep Enter from executing the pipeline until complete.
While it's relatively easy for a user to create a keybinding in their config to map Alt+Enter (assuming macOS ⌘?), given the importance of newline in Nushell CLI-usage, I'd recommend this be a built-in keybinding.
Note: This is built-in to the Fish shell.
The text was updated successfully, but these errors were encountered:
Ya, I've always thought the pipes belong on the right side for the same reasons. I have this in my keybindings because the problem with alt-enter is that it's not free in all terminals.
Nushell pipelines are best split over multiple lines, and the
nufmt
specification recommends "wall of pipes" formatting. E.g.:However, that's extremely tedious to create "out of the box" with Nushell/Reedline at the moment, since a Enter only creates a newline in this case if there's a trailing pipe character on the existing line. E.g.:
ls |
+ Enter will create a newline which can be followed by the next expression, butls
+ Enter executes the command (as it should - I'm not advocating for that to change ;-).In order to create the "wall of pipes", you have to start with the first form
ls |
, hit Enter , then continue your| pipeline
, and then (if you're pedantic) remove the trailing pipe from the previous line. You could also do something like start the pipeline with a(
open-paran to keep Enter from executing the pipeline until complete.While it's relatively easy for a user to create a keybinding in their config to map Alt+Enter (assuming macOS ⌘?), given the importance of newline in Nushell CLI-usage, I'd recommend this be a built-in keybinding.
Note: This is built-in to the Fish shell.
The text was updated successfully, but these errors were encountered: