1*f9e79facSMatthew Phillips# Test positional parameter $0 in PS1 2*f9e79facSMatthew Phillipsoutput=$(PS1='shell:$0:' ENV=/dev/null ${SH} +m -i </dev/null 2>&1) 3*f9e79facSMatthew Phillips# $0 should contain the shell name/path 4*f9e79facSMatthew Phillipscase $output in 5*f9e79facSMatthew Phillips*shell:\$0:*) echo "Positional parameter not expanded, got literal \$0"; exit 1 ;; 6*f9e79facSMatthew Phillips*shell:*sh*:*) exit 0 ;; 7*f9e79facSMatthew Phillips*) echo "Expected shell name after 'shell:' in output"; exit 1 ;; 8*f9e79facSMatthew Phillipsesac 9