Fix: Passt die is_interactive-Prüfung an.
This commit is contained in:
parent
94b359fded
commit
3b11d0e75a
@ -1,8 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
is_interactive() {
|
||||
case $- in
|
||||
*i*) return 1 ;; # Interaktive Shell
|
||||
*) return 0 ;; # Nicht-interaktive Shell
|
||||
esac
|
||||
# Prüft, ob ein Terminal verfügbar ist
|
||||
if [ -t 0 ] || [ -t 1 ] || [ -t 2 ]; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user