mirror of
https://github.com/Cametendo/MyI3Config-fork.git
synced 2026-03-18 03:40:20 +01:00
modifyed fflush
This commit is contained in:
12
install.sh
12
install.sh
@@ -28,11 +28,8 @@ ask_app() {
|
|||||||
local app
|
local app
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
# Print prompt and flush stdout
|
# -p prints prompt, -r prevents backslash escapes
|
||||||
printf "%s (default: %s): " "$label" "$default"
|
read -rp "$label (default: $default): " app
|
||||||
fflush
|
|
||||||
|
|
||||||
read -r app
|
|
||||||
app="${app:-$default}"
|
app="${app:-$default}"
|
||||||
|
|
||||||
# check if command exists
|
# check if command exists
|
||||||
@@ -46,11 +43,6 @@ ask_app() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
# Helper function to flush stdout
|
|
||||||
fflush() {
|
|
||||||
:
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# ----------------------------
|
# ----------------------------
|
||||||
# Installer
|
# Installer
|
||||||
|
|||||||
Reference in New Issue
Block a user