mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
commandline docs: Add examples for the filters
i.e. "-t", "-b", "-j" and "-p"
This commit is contained in:
parent
2c648c80c8
commit
b2323ca203
1 changed files with 21 additions and 0 deletions
|
@ -57,3 +57,24 @@ The following options output metadata about the commandline state:
|
||||||
\subsection commandline-example Example
|
\subsection commandline-example Example
|
||||||
|
|
||||||
`commandline -j $history[3]` replaces the job under the cursor with the third item from the command line history.
|
`commandline -j $history[3]` replaces the job under the cursor with the third item from the command line history.
|
||||||
|
|
||||||
|
If the commandline contains
|
||||||
|
\fish
|
||||||
|
>_ echo $fl___ounder >&2 | less; and echo $catfish
|
||||||
|
\endfish
|
||||||
|
|
||||||
|
(with the cursor on the "o" of "flounder")
|
||||||
|
|
||||||
|
Then the following invocations behave like this:
|
||||||
|
\fish
|
||||||
|
>_ commandline -t
|
||||||
|
$flounder
|
||||||
|
>_ commandline -ct
|
||||||
|
$fl
|
||||||
|
>_ commandline -b # or just commandline
|
||||||
|
echo $flounder >&2 | less; and echo $catfish
|
||||||
|
>_ commandline -p
|
||||||
|
echo $flounder >&2
|
||||||
|
>_ commandline -j
|
||||||
|
echo $flounder >&2 | less
|
||||||
|
\endfish
|
||||||
|
|
Loading…
Reference in a new issue