mirror of
https://github.com/RGBCube/ncc
synced 2025-07-29 11:07:44 +00:00
rebuild: make nu commandline a single line
This commit is contained in:
parent
cf23682ea0
commit
1cdd201b04
1 changed files with 7 additions and 13 deletions
20
rebuild.nu
20
rebuild.nu
|
@ -123,22 +123,16 @@ def darwin-shadow-xcode-popup [] {
|
||||||
def darwin-set-zshrc [] {
|
def darwin-set-zshrc [] {
|
||||||
print "setting zshrc..."
|
print "setting zshrc..."
|
||||||
|
|
||||||
let nu_command = $"
|
let nu_command = $"let usr_bin_index = $env.PATH
|
||||||
let usr_bin_index = $env.PATH
|
| enumerate
|
||||||
| enumerate
|
| where item == /usr/bin
|
||||||
| where item == /usr/bin
|
| get 0.index;
|
||||||
| get 0.index
|
|
||||||
|
|
||||||
$env.PATH = $env.PATH | insert $usr_bin_index ($shadow_path | path expand)
|
$env.PATH = $env.PATH | insert $usr_bin_index ($shadow_path | path expand);
|
||||||
|
|
||||||
$env.SHELL = which nu | get 0.path
|
$env.SHELL = which nu | get 0.path" | str replace --all "\n" ""
|
||||||
"
|
|
||||||
|
|
||||||
let zshrc = $"
|
let zshrc = $"exec nu --execute '($nu_command)'"
|
||||||
exec nu --execute '
|
|
||||||
($nu_command)
|
|
||||||
'
|
|
||||||
"
|
|
||||||
|
|
||||||
$zshrc | save --force ~/.zshrc
|
$zshrc | save --force ~/.zshrc
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue