From f887c3b0c6e991ba88d81ecdee14235901e82374 Mon Sep 17 00:00:00 2001 From: Ehsan Ghorbannezhad Date: Thu, 30 Jun 2022 19:08:58 +0430 Subject: [PATCH] add a new 't' command to toggle showing internal devices --- bashmount | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/bashmount b/bashmount index 26d37c9..bb8f7b6 100755 --- a/bashmount +++ b/bashmount @@ -151,13 +151,14 @@ print_commands() { printf '\n\n' print_separator_commands printf '%s' " ${BLUE}e${ALL_OFF}: eject" - printf '%s' " ${BLUE}i${ALL_OFF}: info" - printf '%s' " ${BLUE}m${ALL_OFF}: mount" - printf '%s' " ${BLUE}o${ALL_OFF}: open" - printf '%s' " ${BLUE}u${ALL_OFF}: unmount" + printf '%s' " ${BLUE}i${ALL_OFF}: info" + printf '%s' " ${BLUE}m${ALL_OFF}: mount" + printf '%s' " ${BLUE}o${ALL_OFF}: open" + printf '%s' " ${BLUE}u${ALL_OFF}: unmount" + printf '%s' " ${BLUE}[Enter]${ALL_OFF}: refresh" printf '\n\n' - printf '%s' " ${BLUE}[Enter]${ALL_OFF}: refresh" - printf '%s' " ${BLUE}a${ALL_OFF}: unmount all" + printf '%s' " ${BLUE}t${ALL_OFF}: toggle internal" + printf '%s' " ${BLUE}a${ALL_OFF}: unmount all" printf '%s' " ${BLUE}q${ALL_OFF}: quit" printf '%s' " ${BLUE}?${ALL_OFF}: help" printf '\n\n' @@ -819,6 +820,7 @@ select_action() { fi else case "$action" in + "t") show_internal=$(( ! show_internal )) ;; "a") if (( ! ${#mounted[*]} )); then error "No devices mounted."