koishi-plugin-bang
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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.

Package Sidebar

Install

npm i koishi-plugin-bang

Weekly Downloads

31

Version

1.0.0

License

MIT

Unpacked Size

13.4 kB

Total Files

6

Last publish

Collaborators

  • maiko_tan