diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2018-11-13 11:03:37 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2018-11-13 11:03:37 +0100 |
commit | 76812c9bb71193b7a9a4d059890915535ef49441 (patch) | |
tree | 26f906dd5b6c1449314ce1caa9a7a7e6b0fa419c | |
parent | 8a7f897b30780dbf9b733fa413d679140fd1c27a (diff) | |
download | plan9front-76812c9bb71193b7a9a4d059890915535ef49441.tar.xz |
rcpu: fix pvar to initialize empty variables (thanks mycroftiv)
-rwxr-xr-x | rc/bin/rconnect | 3 | ||||
-rwxr-xr-x | rc/bin/rcpu | 3 | ||||
-rwxr-xr-x | rc/bin/rexport | 3 | ||||
-rwxr-xr-x | rc/bin/rimport | 3 |
4 files changed, 8 insertions, 4 deletions
diff --git a/rc/bin/rconnect b/rc/bin/rconnect index 5d672aae7..26c50a73f 100755 --- a/rc/bin/rconnect +++ b/rc/bin/rconnect @@ -10,7 +10,8 @@ fn usage { fn pvar { while(! ~ $#* 0){ - ~ $#$1 0 || path=/dev/null builtin whatis $1 + ~ $#$1 0 && echo $1'=()' || + path=/dev/null builtin whatis $1 shift } } diff --git a/rc/bin/rcpu b/rc/bin/rcpu index 1a6b83b83..54f670c67 100755 --- a/rc/bin/rcpu +++ b/rc/bin/rcpu @@ -76,7 +76,8 @@ while(~ $1 -*){ fn pvar { while(! ~ $#* 0){ - ~ $#$1 0 || path=/dev/null builtin whatis $1 + ~ $#$1 0 && echo $1'=()' || + path=/dev/null builtin whatis $1 shift } } diff --git a/rc/bin/rexport b/rc/bin/rexport index a7364e58f..99030a363 100755 --- a/rc/bin/rexport +++ b/rc/bin/rexport @@ -49,7 +49,8 @@ cmd=$* fn pvar { while(! ~ $#* 0){ - ~ $#$1 0 || path=/dev/null builtin whatis $1 + ~ $#$1 0 && echo $1'=()' || + path=/dev/null builtin whatis $1 shift } } diff --git a/rc/bin/rimport b/rc/bin/rimport index 3b9906806..a55f2079d 100755 --- a/rc/bin/rimport +++ b/rc/bin/rimport @@ -44,7 +44,8 @@ case *; usage fn pvar { while(! ~ $#* 0){ - ~ $#$1 0 || path=/dev/null builtin whatis $1 + ~ $#$1 0 && echo $1'=()' || + path=/dev/null builtin whatis $1 shift } } |