what a rabbithole. lots of goodies now.

This commit is contained in:
2021-12-18 04:23:35 -05:00
parent 11b0744e5c
commit 8f582d37f1
24 changed files with 399 additions and 326 deletions

View File

@@ -16,12 +16,10 @@
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package terminal
import (
"os"
"fmt"
)
// IsShell returns true if the program is running inside an interactive shell (interactive invocation, sudo, etc.), and false if not (cron, ssh exec, pipe, etc.).
@@ -32,8 +30,8 @@ func IsShell() (interactive bool) {
stdoutStat, _ = os.Stdout.Stat()
if (stdoutStaf.Mode() & os.ModeCharDevice) != 0 {
interactive = True
if (stdoutStat.Mode() & os.ModeCharDevice) != 0 {
interactive = true
}
return