Replies: 1 comment 3 replies
-
If you want to connect the two exactly previous commands, you can use the history expansion feature: You can input
However, it is true that you cannot use the history "search" when you don't know the offset of the command in the command history.
I've never thought about the possibility that users would want to disable the feature, so I've never thought about implementing it. What seems non-trivial is the way to parse such separated commands. I don't want to provide the wrong syntax highlighting because it might confuse the users and cause destructive results unwanted by the user. But then, to provide the correct syntax highlighting, one needs to carry the incomplete syntax tree of the previous command line and somehow start parsing the current command line from an incomplete syntax context. To efficiently implement the syntax analysis in Bash script, ble.sh uses a very specific way of representing the incremental syntax structure, but I didn't design the parser so that it can be used to start the parsing from inside the non-trivial syntax state such as the nested structure. Then, I need to rewrite the Bash parser from scratch.
That is technically the history expansion. If you know the offset of the entry in the command history, you can write e.g. However, as I already wrote, if you do not know the offset of the history entry to insert, you probably want to navigate through the command history. In that case, one way is to copy and paste the command to insert.
If you just want to navigate through the history in-place, you'll need to implement the feature by yourself. Actually, the existing feature |
Beta Was this translation helpful? Give feedback.
-
Let's say you type a long command, then a second one. You then realize that you want to chain them. Before ble.sh, I would:
I'm new to
ble.sh
, but I can't see a simple way to simply concat this way 2 commands. The multiline editor kicks in step 2. and forbids me apparently to do any history search. What am I doing wrong ? Can I disable multiline editor for this case ? Or can I call the history to insert exactly one entry of the history inside the multiline editor ?Sorry if I missed something obvious.
Beta Was this translation helpful? Give feedback.
All reactions