aboutsummaryrefslogtreecommitdiffstats
path: root/bash_include
diff options
context:
space:
mode:
authorLAN-TW <lantw44@gmail.com>2012-02-19 14:04:15 +0800
committerLAN-TW <lantw44@gmail.com>2012-02-19 14:04:15 +0800
commit776e9646b39d704b2bccfe4b494aae182baaa60b (patch)
treee4a64f48eb094796f5647753c437f92293d695e0 /bash_include
parent5832fe44203ccf0cc00134fa9c2e7834260d1861 (diff)
downloadconfigfile-776e9646b39d704b2bccfe4b494aae182baaa60b.tar
configfile-776e9646b39d704b2bccfe4b494aae182baaa60b.tar.gz
configfile-776e9646b39d704b2bccfe4b494aae182baaa60b.tar.bz2
configfile-776e9646b39d704b2bccfe4b494aae182baaa60b.tar.lz
configfile-776e9646b39d704b2bccfe4b494aae182baaa60b.tar.xz
configfile-776e9646b39d704b2bccfe4b494aae182baaa60b.tar.zst
configfile-776e9646b39d704b2bccfe4b494aae182baaa60b.zip
bash_include: 完全不使用外部程式判斷互動式 shellbash_include-20120219
Diffstat (limited to 'bash_include')
-rw-r--r--bash_include2
1 files changed, 1 insertions, 1 deletions
diff --git a/bash_include b/bash_include
index 45ea26b..1bf6aac 100644
--- a/bash_include
+++ b/bash_include
@@ -6,7 +6,7 @@
#
#### if tty -s; then interactive_shell=1; fi
-if [ "`echo "$-" | grep "i" `" ]; then interactive_shell=1; fi
+if [[ "$-" == *i* ]] ; then interactive_shell=1; fi
[ "$interactive_shell" ] && echo "Running .bash_include"
[ "$interactive_shell" ] && default_tty_setting="`stty -g`"