mirror of
https://github.com/nushell/nu_scripts.git
synced 2024-08-16 17:00:32 +03:00
replace def-env
with def --env
(#641)
- upgrade to 0.86 Co-authored-by: agent <agent@nuc>
This commit is contained in:
parent
0a030b524b
commit
c39a41ad2d
@ -175,7 +175,7 @@ export def gb [
|
||||
}
|
||||
|
||||
# git clone, init
|
||||
export def-env gn [
|
||||
export def --env gn [
|
||||
repo?: string@"nu-complete git branches"
|
||||
local?: path
|
||||
--submodule (-s) # git submodule
|
||||
|
@ -409,7 +409,7 @@ export def 'kconf export' [name: string@"nu-complete kube ctx"] {
|
||||
} | to yaml
|
||||
}
|
||||
|
||||
export def-env kcconf [name: string@"nu-complete kube ctx"] {
|
||||
export def --env kcconf [name: string@"nu-complete kube ctx"] {
|
||||
let dist = $"($env.HOME)/.kube/config.d"
|
||||
mkdir $dist
|
||||
kconf export $name | save -fr $"($dist)/($name)"
|
||||
|
@ -372,7 +372,7 @@ export def default_env [name value] {
|
||||
}
|
||||
}
|
||||
|
||||
export def-env init [] {
|
||||
export def --env init [] {
|
||||
match $env.NU_POWER_FRAME {
|
||||
'default' => {
|
||||
match $env.NU_POWER_MODE {
|
||||
@ -432,7 +432,7 @@ export def-env init [] {
|
||||
hook
|
||||
}
|
||||
|
||||
export def-env set [name theme config?] {
|
||||
export def --env set [name theme config?] {
|
||||
$env.NU_POWER_THEME = (if ($theme | is-empty) {
|
||||
$env.NU_POWER_THEME
|
||||
} else {
|
||||
@ -456,7 +456,7 @@ export def-env set [name theme config?] {
|
||||
})
|
||||
}
|
||||
|
||||
export def-env register [name source theme config?] {
|
||||
export def --env register [name source theme config?] {
|
||||
set $name $theme $config
|
||||
|
||||
$env.NU_PROMPT_COMPONENTS = (
|
||||
@ -464,7 +464,7 @@ export def-env register [name source theme config?] {
|
||||
)
|
||||
}
|
||||
|
||||
export def-env inject [pos idx define theme? config?] {
|
||||
export def --env inject [pos idx define theme? config?] {
|
||||
let prev = ($env.NU_POWER_SCHEMA | get $pos)
|
||||
let next = if $idx == 0 {
|
||||
$prev | prepend $define
|
||||
@ -512,11 +512,11 @@ export def-env inject [pos idx define theme? config?] {
|
||||
}
|
||||
}
|
||||
|
||||
export def-env eject [] {
|
||||
export def --env eject [] {
|
||||
"power eject not implement"
|
||||
}
|
||||
|
||||
export def-env hook [] {
|
||||
export def --env hook [] {
|
||||
$env.config = ( $env.config | upsert hooks.env_change { |config|
|
||||
let init = [{|before, after| if not ($before | is-empty) { init } }]
|
||||
$config.hooks.env_change
|
||||
|
Loading…
Reference in New Issue
Block a user