mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-02 15:17:47 +00:00
parent
a2f82bd987
commit
ab0d3aaad0
2 changed files with 6 additions and 4 deletions
|
@ -33,7 +33,7 @@ def spr [args] {
|
||||||
}
|
}
|
||||||
|
|
||||||
def get-sign [cmd] {
|
def get-sign [cmd] {
|
||||||
let x = ($nu.scope.commands | where name == $cmd).signatures?.0?.any?
|
let x = (scope commands | where name == $cmd).signatures?.0?.any?
|
||||||
mut s = []
|
mut s = []
|
||||||
mut n = {}
|
mut n = {}
|
||||||
mut p = []
|
mut p = []
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
def get-sign [cmd] {
|
def get-sign [cmd] {
|
||||||
let x = ($nu.scope.commands | where name == $cmd).signatures?.0?.any?
|
let x = (scope commands | where name == $cmd).signatures?.0?.any?
|
||||||
mut s = []
|
mut s = []
|
||||||
mut n = {}
|
mut n = {}
|
||||||
mut p = []
|
mut p = []
|
||||||
|
@ -250,7 +250,7 @@ export def kh [
|
||||||
let values = if ($values | is-empty) { [] } else { [--set-json (record-to-set-json $values)] }
|
let values = if ($values | is-empty) { [] } else { [--set-json (record-to-set-json $values)] }
|
||||||
let target = ($valuefile | split row '.' | range ..-2 | append [out yaml] | str join '.')
|
let target = ($valuefile | split row '.' | range ..-2 | append [out yaml] | str join '.')
|
||||||
if (not ($target | path exists)) and (([yes no] | input list $'create ($target)?') in [no]) { return }
|
if (not ($target | path exists)) and (([yes no] | input list $'create ($target)?') in [no]) { return }
|
||||||
helm template $app $chart -f $valuefile $values (spr [-n $namespace])
|
helm template --debug $app $chart -f $valuefile $values (spr [-n $namespace])
|
||||||
| save -f $target
|
| save -f $target
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -676,11 +676,13 @@ export def kl [
|
||||||
--namespace(-n): string@"nu-complete kube ns"
|
--namespace(-n): string@"nu-complete kube ns"
|
||||||
--container(-c): string@"nu-complete kube ctns"
|
--container(-c): string@"nu-complete kube ctns"
|
||||||
--follow(-f): bool
|
--follow(-f): bool
|
||||||
|
--previous(-p): bool
|
||||||
] {
|
] {
|
||||||
let n = (spr [-n $namespace])
|
let n = (spr [-n $namespace])
|
||||||
let c = (spr [-c $container])
|
let c = (spr [-c $container])
|
||||||
let f = (sprb $follow [-f])
|
let f = (sprb $follow [-f])
|
||||||
kubectl logs $n $f $pod $c
|
let p = (sprb $previous [-p])
|
||||||
|
kubectl logs $n $f $p $pod $c
|
||||||
}
|
}
|
||||||
|
|
||||||
def "nu-complete port forward type" [] {
|
def "nu-complete port forward type" [] {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue