More idiomatic version of svlasov answer :
ls $( (( test == 1 )) && printf %s '-la' ) -R
echo , printf %s, , .
, - , - . .
, , :
args=()
(( test == 1 )) && args+=( '-la' )
args+=( '-R' )
ls "${args[@]}"
. OP , , ls -R -la "$PWD".
: , , :
(( test == 1 )) && args+= ( '-la' "$PWD" )
,
ls `if [ $test -eq 1 ]; then -la; fi` -R
:
backticks ( , , $(...)) - - ( -), stdout.
, -la, . stdout, , , echo printf.