1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-08-01 06:37:46 +00:00

new module comma and some updates (#704)

update:
- cwdhist: openeditor changed from alt+e to alt+o
- docker: pull, push add nerdctl insecure-registry support
- docker: registry show use curl instead http get (may cause dns
resolution problems)
- git: status `table -n` changed to `table -i`

new module: comma

Similar to `pwd-module`, but supports completion and description through
custom data formats
- `,` or `*` need to be exported in order to use `,` directly
- Directly execute `,` to create a new template file or edit an existing
file
- Custom tasks are written in `$env.comma` and can be nested
- Generate completions based on the structure of `$env.comma`
- You can use closure to customize completion
- In `$env.commax.act` of default closure, you can receive parameters
after the current position
- In `$env.commax.cmp` , you can receive the parameter before the
current position

---------

Co-authored-by: nash <nash@iffy.me>
This commit is contained in:
fj0r 2023-12-20 20:03:20 +08:00 committed by GitHub
parent 6f1c0dfef2
commit fce44fbbfd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 318 additions and 28 deletions

View file

@ -53,7 +53,7 @@ def __cwdhist_editing [] {
{
name: open_command_editor
modifier: alt
keycode: char_e
keycode: char_o
mode: [emacs, vi_normal, vi_insert]
event: { send: openeditor }
}
@ -63,7 +63,7 @@ def __cwdhist_switching [] {
{
name: cwdhist_switching
modifier: shift_alt
keycode: char_e
keycode: char_o
mode: [emacs, vi_normal, vi_insert]
event: [
{ send: ExecuteHostCommand, cmd: '$env.cwd_history_full = (not $env.cwd_history_full)' }