File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -360,6 +360,16 @@ _polyglot_is_dtksh() {
360
360
esac
361
361
}
362
362
363
+ # ##########################################################
364
+ # Test to see if sh is really dash
365
+ # ##########################################################
366
+ _polyglot_sh_is_dash () {
367
+ case $( ls -l " $( command -v " $0 " ) " ) in
368
+ * dash* ) return 0 ;;
369
+ * ) return 1 ;;
370
+ esac
371
+ }
372
+
363
373
# ####################################################################
364
374
# zsh
365
375
# ####################################################################
@@ -614,7 +624,8 @@ elif [ "$KSH_VERSION" ] || _polyglot_is_dtksh || [ "$ZSH_VERSION" ] \
614
624
# pdksh, dash, busybox ash, and zsh in sh emulation mode
615
625
# ###################################################################
616
626
617
- elif _polyglot_is_pdksh || [ " $0 " = ' dash' ] || _polyglot_is_busybox; then
627
+ elif _polyglot_is_pdksh || [ " $0 " = ' dash' ] || _polyglot_is_busybox \
628
+ || _polyglot_sh_is_dash; then
618
629
619
630
# Only display the $HOSTNAME for an ssh connection
620
631
if _polyglot_is_ssh || _polyglot_is_superuser; then
695
706
696
707
# Clean up environment
697
708
unset -f _polyglot_is_ssh _polyglot_basename _polyglot_is_busybox \
698
- _polyglot_is_dtksh _polyglot_is_pdksh
709
+ _polyglot_is_dtksh _polyglot_is_pdksh _polyglot_sh_is_dash
699
710
700
711
# vim: ts=2:et:sts=2:sw=2
You can’t perform that action at this time.
0 commit comments