diff options
author | LAN-TW <lantw44@gmail.com> | 2012-02-19 14:04:15 +0800 |
---|---|---|
committer | LAN-TW <lantw44@gmail.com> | 2012-02-19 14:04:15 +0800 |
commit | 776e9646b39d704b2bccfe4b494aae182baaa60b (patch) | |
tree | e4a64f48eb094796f5647753c437f92293d695e0 | |
parent | 5832fe44203ccf0cc00134fa9c2e7834260d1861 (diff) | |
download | configfile-776e9646b39d704b2bccfe4b494aae182baaa60b.tar.gz configfile-776e9646b39d704b2bccfe4b494aae182baaa60b.tar.zst configfile-776e9646b39d704b2bccfe4b494aae182baaa60b.zip |
bash_include: 完全不使用外部程式判斷互動式 shellbash_include-20120219
-rw-r--r-- | bash_include | 2 |
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`" |