Commit 61c18fbc by Eric Coissac

Adds an isinteractiveshell function to test if the running shell is

interactive
parent 8164a5f4
......@@ -93,6 +93,11 @@ if [[ -z "${LECALIB_UTIL_SH}" ]]; then
[[ $(hostname) =~ ^frog ]]
}
function isinteractiveshell() {
local fd=0
[[ -t "$fd" || -p /dev/stdin ]]
}
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