Minor text changes

This commit is contained in:
Dusk 2021-08-25 17:19:32 +02:00
parent 9e447c18b4
commit d319b9d01d
1 changed files with 6 additions and 5 deletions

11
pipechat Normal file → Executable file
View File

@ -16,14 +16,15 @@ listen_pid=$!
choice="" choice=""
choice2="" choice2=""
while [ "$choice" != "q" ] while [ "$choice" != ":quit" ]
do do
echo "Available users: (Type 'q' to exit)" echo "Type an available user or ':quit' to exit."
echo "Available users:"
ls $basedir ls $basedir
read choice read choice
[ -p $basedir/$choice ] && { [ -p $basedir/$choice ] && {
clear clear
echo "Chat with $choice. -Type :quit to exit" echo "Chat with $choice. --- Type ':quit' to exit"
while true while true
do do
read choice2 read choice2
@ -31,12 +32,12 @@ do
:quit) break ;; :quit) break ;;
:help) echo "Type :quit to quit." ;; :help) echo "Type :quit to quit." ;;
#*) printf "\e[0;36m${USER}: $choice2\e[m\n" > $basedir/$choice ;; #*) printf "\e[0;36m${USER}: $choice2\e[m\n" > $basedir/$choice ;;
*) printf "${USER}: $choice2" > $basedir/$choice ;; *) printf "${USER}: $choice2\n" > $basedir/$choice ;;
esac esac
done done
} }
[ -p $basedir/$choice ] || [ "$choice" = "q" ] || echo "$choice is not an available user" [ -p $basedir/$choice ] || [ "$choice" = ":quit" ] || echo "$choice is not an available user"
done done
kill $listen_pid kill $listen_pid