Provide functions to toggle commandline prefix/suffix

This introduces two functions to
- toggle a process prefix, used for adding "sudo"
- add a job suffix, used for adding "&| less"

Not sure if they are very useful; we'll see.

Closes #7905
This commit is contained in:
Johannes Altmanninger
2021-06-23 08:55:33 +02:00
parent be0b451207
commit 7c2dd694e0
7 changed files with 41 additions and 30 deletions

View File

@@ -217,6 +217,10 @@ The following functions are included as normal functions, but are particularly u
- ``fish_clipboard_paste``, paste the current selection from the system clipboard before the cursor
- ``fish_commandline_append``, append the argument to the command-line. If the command-line already ends with the argument, this removes the suffix instead. Starts with the last command from history if the command-line is empty.
- ``fish_commandline_prepend``, prepend the argument to the command-line. If the command-line already starts with the argument, this removes the prefix instead. Starts with the last command from history if the command-line is empty.
Examples
--------