npm.io
1.0.0 • Published 3 years ago

koishi-plugin-bang

Licence
MIT
Version
1.0.0
Deps
0
Size
13 kB
Vulns
0
Weekly
0

koishi-plugin-bang

bang (!) command implementation in Koishi

Usage

Just like the bang command in bash, you can use ! to introduce a command that you have previously issued.

!! - Repeat the last command

$ echo hello
hello
$ !!
hello
!n - Repeat the nth command
$ echo hello
hello
$ echo world
world
$ !1
hello
!-n - Repeat the command n steps back
$ echo hello
hello
$ echo world
world
$ !-1
world
!string - Repeat the last command starting with string
$ echo hello
hello
$ echo world
world
$ !e
world
!?string - Repeat the last command containing string
$ echo hello
hello
$ echo world
world
$ !?l
world
:p suffix - Print the command instead of executing it
$ echo hello
hello
$ !!:p
echo hello

License

This project is licensed under the MIT License.

Keywords