Commit 3d9278fe by Eric Coissac

Change the way to encode isinteractiveshell

parent 2a407ccd
......@@ -94,10 +94,12 @@ if [[ -z "${LECALIB_UTIL_SH}" ]]; then
}
function isinteractiveshell() {
local fd=0
[[ -t "$fd" || -p /dev/stdin ]]
}
case "$-" in
*i*) (( 1 == 1 )) ;;
*) (( 1 == 0 )) ;;
esac
}
function pushd () {
command pushd "$@" > /dev/null
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment