It's heavily inspired by knqyf263/pet but have some features for my own usage.
clipit clip "git push <remote=github|gitlab> <branch=master>"
clipit list
clipit exec "git push <remote=github|gitlab> <branch=master>"
# choose `github` or `gitlab` for `remote` in selectable prompt.
# Variable for <remote=github|gitlab>:
# github
# ▸ gitlab
#
# override or use `master` for `branch` in prompt.
# Variable for <branch=master>: master|
Usage:
clipit [command]
Available Commands:
clip Save snippet.
completion Generate the autocompletion script for the specified shell
config Commands for setting configuration.
edit Edit commands with selected editor.
exec Execute passed command.
help Help about any command
list List all saved commands.
Flags:
-h, --help help for clipit
clipit exec "echo something"
you can use variables too.
clipit clip "gh pr view <pr-num>"
This will launch prompt for setting pr-num
when executing.
clipit clip "git push <remote=github|gitlab> <branch=master>"
You can set default values and choices too.
<remote=github|gitlab>
will launch selectable ui for choosing github
or gitlab
.
<branch=master>
will set default value but you can override it in prompt.
saves snippets in local file.
clipit clip "echo something"
clipit list
List all the commands.
Its main usage it to pass it to peco/peco or some kind of different tools.