1
Fork 0
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:
Auca Coyan 2024-07-21 09:21:21 -03:00 committed by GitHub
parent be32cdaefc
commit ba46538785
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 10 deletions

View file

@ -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')