diff options
| author | Maxime Coste <mawww@kakoune.org> | 2020-10-20 21:45:29 +1100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2020-10-20 21:56:51 +1100 |
| commit | 9a5cf2fc9f9d4afff586109239a1a3640c821727 (patch) | |
| tree | 0c15c519c64bbc0776335c9ee5e970d59827a9ad /test/normal | |
| parent | 354cfd3b8f3a93145b6f1b248bb1d047336d2e48 (diff) | |
Support explicit register for :, |, ! and $ commands
Giving an explicit register uses its content for the default value
to use if the user does not enter anything. This enables:
`set-register a %{commands}; execute-keys '"a:<ret>'`
`set-register a %{shell script}; execute-keys '"a|<ret>'`
...
This provides a nice way to avoid the need to escape keys to use
those normal mode commands.
Fixes #3825
Diffstat (limited to 'test/normal')
| -rw-r--r-- | test/normal/keep-cmd-reg/cmd | 1 | ||||
| -rw-r--r-- | test/normal/keep-cmd-reg/in | 3 | ||||
| -rw-r--r-- | test/normal/keep-cmd-reg/kak_quoted_selections | 1 | ||||
| -rw-r--r-- | test/normal/keep-cmd-reg/rc | 1 | ||||
| -rw-r--r-- | test/normal/pipe-reg/cmd | 1 | ||||
| -rw-r--r-- | test/normal/pipe-reg/in | 1 | ||||
| -rw-r--r-- | test/normal/pipe-reg/out | 1 | ||||
| -rw-r--r-- | test/normal/pipe-reg/rc | 1 | ||||
| -rw-r--r-- | test/normal/pipe-to-reg/cmd | 1 | ||||
| -rw-r--r-- | test/normal/pipe-to-reg/in | 1 | ||||
| -rw-r--r-- | test/normal/pipe-to-reg/out | 1 | ||||
| -rw-r--r-- | test/normal/pipe-to-reg/rc | 1 |
12 files changed, 14 insertions, 0 deletions
diff --git a/test/normal/keep-cmd-reg/cmd b/test/normal/keep-cmd-reg/cmd new file mode 100644 index 00000000..83989018 --- /dev/null +++ b/test/normal/keep-cmd-reg/cmd @@ -0,0 +1 @@ +%<a-s>H"a$<ret> diff --git a/test/normal/keep-cmd-reg/in b/test/normal/keep-cmd-reg/in new file mode 100644 index 00000000..928fc5df --- /dev/null +++ b/test/normal/keep-cmd-reg/in @@ -0,0 +1,3 @@ +foo +rha +bar diff --git a/test/normal/keep-cmd-reg/kak_quoted_selections b/test/normal/keep-cmd-reg/kak_quoted_selections new file mode 100644 index 00000000..57f09b9e --- /dev/null +++ b/test/normal/keep-cmd-reg/kak_quoted_selections @@ -0,0 +1 @@ +'foo' 'bar' diff --git a/test/normal/keep-cmd-reg/rc b/test/normal/keep-cmd-reg/rc new file mode 100644 index 00000000..bb917bfe --- /dev/null +++ b/test/normal/keep-cmd-reg/rc @@ -0,0 +1 @@ +set-register a %{grep 'foo\|bar'} diff --git a/test/normal/pipe-reg/cmd b/test/normal/pipe-reg/cmd new file mode 100644 index 00000000..8c8c8bb9 --- /dev/null +++ b/test/normal/pipe-reg/cmd @@ -0,0 +1 @@ +"a|<ret> diff --git a/test/normal/pipe-reg/in b/test/normal/pipe-reg/in new file mode 100644 index 00000000..c2267c2e --- /dev/null +++ b/test/normal/pipe-reg/in @@ -0,0 +1 @@ +%(foo) diff --git a/test/normal/pipe-reg/out b/test/normal/pipe-reg/out new file mode 100644 index 00000000..5716ca59 --- /dev/null +++ b/test/normal/pipe-reg/out @@ -0,0 +1 @@ +bar diff --git a/test/normal/pipe-reg/rc b/test/normal/pipe-reg/rc new file mode 100644 index 00000000..8f2e0357 --- /dev/null +++ b/test/normal/pipe-reg/rc @@ -0,0 +1 @@ +set-register a 'sed s/foo/bar/' diff --git a/test/normal/pipe-to-reg/cmd b/test/normal/pipe-to-reg/cmd new file mode 100644 index 00000000..11789850 --- /dev/null +++ b/test/normal/pipe-to-reg/cmd @@ -0,0 +1 @@ +"a<a-|><ret>:e! out<ret> diff --git a/test/normal/pipe-to-reg/in b/test/normal/pipe-to-reg/in new file mode 100644 index 00000000..d29170cc --- /dev/null +++ b/test/normal/pipe-to-reg/in @@ -0,0 +1 @@ +%(foobar) diff --git a/test/normal/pipe-to-reg/out b/test/normal/pipe-to-reg/out new file mode 100644 index 00000000..189899d2 --- /dev/null +++ b/test/normal/pipe-to-reg/out @@ -0,0 +1 @@ +barbar diff --git a/test/normal/pipe-to-reg/rc b/test/normal/pipe-to-reg/rc new file mode 100644 index 00000000..41a550da --- /dev/null +++ b/test/normal/pipe-to-reg/rc @@ -0,0 +1 @@ +set-register a %{sed -n "s/foo/bar/; P" > out} |
