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

Experimental multi-taskrunner support for jx (npm for example) (#492)

* Experimental multi-task runner support for `jx` (npm for example)

- Remove `nu-complete` export for debugging.
- Formatting `nu-complete just recipes`

* Use `jx` to override `j`.

Only for `just`, it only adds a prefix when completing, and does not break the original workflow

* `nu-complete just recipes` append empty string

When all the completions are `just xxx`, there is only `just` in the menu, press `C-w` to delete backwards to work.

* kgp takes `-o default` by default

move just to just/just.nu

* `gp` uses `git pull` instead of `git fetch` by default, and there is only one request when `push` is not needed

* add kgpw for `kubectl get pods --watch`

adjust `gm` to make it clearer

* remove just.nu

---------

Co-authored-by: agent <agent@nuc>
This commit is contained in:
fj0r 2023-05-17 09:07:08 +08:00 committed by GitHub
parent f86a060c10
commit b6ecfe3680
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 14 deletions

View file

@ -122,13 +122,11 @@ export def gp [
git fetch $remote $branch
}
} else {
git fetch
let r = if $rebase { [--rebase] } else { [] }
let a = if $autostash { [--autostash] } else { [] }
git pull $r $a -v
let s = (_git_status)
if $s.behind > 0 {
let r = if $rebase { [--rebase] } else { [] }
let a = if $autostash { [--autostash] } else { [] }
git pull $r $a -v
} else if $s.ahead > 0 {
if $s.ahead > 0 {
git push
}
}
@ -221,10 +219,12 @@ export def gm [
git rebase $branch
}
}
} else if ($branch | is-empty) {
git merge $"origin/(git_main_branch)"
} else {
git merge $branch
if ($branch | is-empty) {
git merge $"origin/(git_main_branch)"
} else {
git merge $branch
}
}
}
@ -484,7 +484,7 @@ def "nu-complete git log" [] {
| each {|x| $x | update value $"($x.value)"}
}
export def "nu-complete git branches" [] {
def "nu-complete git branches" [] {
git branch
| lines
| filter {|x| not ($x | str starts-with '*')}