rcpu: fix pvar to initialize empty variables (thanks mycroftiv)

This commit is contained in:
cinap_lenrek 2018-11-13 11:03:37 +01:00
parent 8a7f897b30
commit 76812c9bb7
4 changed files with 8 additions and 4 deletions

View file

@ -10,7 +10,8 @@ fn usage {
fn pvar { fn pvar {
while(! ~ $#* 0){ while(! ~ $#* 0){
~ $#$1 0 || path=/dev/null builtin whatis $1 ~ $#$1 0 && echo $1'=()' ||
path=/dev/null builtin whatis $1
shift shift
} }
} }

View file

@ -76,7 +76,8 @@ while(~ $1 -*){
fn pvar { fn pvar {
while(! ~ $#* 0){ while(! ~ $#* 0){
~ $#$1 0 || path=/dev/null builtin whatis $1 ~ $#$1 0 && echo $1'=()' ||
path=/dev/null builtin whatis $1
shift shift
} }
} }

View file

@ -49,7 +49,8 @@ cmd=$*
fn pvar { fn pvar {
while(! ~ $#* 0){ while(! ~ $#* 0){
~ $#$1 0 || path=/dev/null builtin whatis $1 ~ $#$1 0 && echo $1'=()' ||
path=/dev/null builtin whatis $1
shift shift
} }
} }

View file

@ -44,7 +44,8 @@ case *; usage
fn pvar { fn pvar {
while(! ~ $#* 0){ while(! ~ $#* 0){
~ $#$1 0 || path=/dev/null builtin whatis $1 ~ $#$1 0 && echo $1'=()' ||
path=/dev/null builtin whatis $1
shift shift
} }
} }