rcpu: fix pvar to initialize empty variables (thanks mycroftiv)
This commit is contained in:
parent
8a7f897b30
commit
76812c9bb7
4 changed files with 8 additions and 4 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue