From 76812c9bb71193b7a9a4d059890915535ef49441 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Tue, 13 Nov 2018 11:03:37 +0100 Subject: rcpu: fix pvar to initialize empty variables (thanks mycroftiv) --- rc/bin/rconnect | 3 ++- rc/bin/rcpu | 3 ++- rc/bin/rexport | 3 ++- 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 } } -- cgit v1.2.3