2022-04-06 12:27:26 -07:00
|
|
|
#!/bin/bash
|
|
|
|
iecho () {
|
|
|
|
[[ ! -z "$PS1" ]] && echo $1
|
2022-12-26 10:21:30 -08:00
|
|
|
return 0
|
2022-04-06 12:27:26 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
# no way to tell if sourced vs subshell
|
|
|
|
# # [[ ! -z "$PS1" ]] && [[ $SHLVL -eq 1 ]] && echo $1
|
|
|
|
# # echo [[ -z $PS1 ]]
|
|
|
|
# echo $SHLVL
|
|
|
|
# echo $$
|
|
|
|
# echo $BASHPID
|
|
|
|
# if [[ -t 1 ]]; then
|
|
|
|
# echo "Terminal"
|
|
|
|
# else
|
|
|
|
# echo "Not-a-terminal"
|
|
|
|
# fi
|