mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-01 14:47:47 +00:00
🐛 parser fixes (#801)
- replace `str collect` for `str join` - replace `str lpad` for `fill` - `str lpad -c` for `fill --width` - `str rpad -l` for `fill --alignment r --width` - updated `before_v0.60/README.md` - `$nu.scope.commands` for `scope commands` - add a couple of `if (true) {} else {}` (else keyword) - `$true` for `true` - `$false` for `false`
This commit is contained in:
parent
be32cdaefc
commit
ba46538785
2 changed files with 10 additions and 10 deletions
|
@ -22,7 +22,7 @@ def "nu-complete hosts" [] {
|
|||
}
|
||||
|
||||
def "nu-complete scripts" [] {
|
||||
$nu.scope.commands
|
||||
scope commands
|
||||
|where is_custom
|
||||
|get -i command
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ export def "ssh script" [
|
|||
...args # arguments you wish to pass to the script in key=value format
|
||||
] {
|
||||
let span = (metadata $script).span
|
||||
if $script in ($nu.scope.commands|where is_custom|get command) {
|
||||
if $script in (scope commands|where is_custom|get command) {
|
||||
|
||||
let host = (hosts|where name == $hostname|get 0)
|
||||
let full_command = (build-string (view-source $script) '; ' $script ' ' ($args|str join ' ') '|to json -r')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue