Skip to content

Commit

Permalink
Add /exit command as alternative to /quit
Browse files Browse the repository at this point in the history
This avoids sending a stupid one-line message when you forget what the exit command was.
  • Loading branch information
JKrag committed Feb 7, 2023
1 parent 62d8854 commit ae1e1c3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion chat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ git config alias.chatlog "log --reverse --pretty=\"format:%C(green)%aN %C(blue)[

commands() {
echo "Commands:"
echo -e "${GREEN}/quit${RC} (to quit chat)"
echo -e "${GREEN}/quit or /exit${RC} (to quit chat)"
echo -e "${GREEN}/help${RC} (print list of supported commands)"
echo -e "${GREEN}/switch <channel name>${RC} (to change #channel"
echo -e "${GREEN}/create <channel name>${RC} (to create a new #channel)"
Expand Down Expand Up @@ -50,6 +50,8 @@ while true ; do
:
elif [ "$cm" = "/quit" ]; then
exit 0
elif [ "$cm" = "/exit" ]; then
exit 0
elif [ "$cm" = "/help" ]; then
commands
echo
Expand Down

0 comments on commit ae1e1c3

Please sign in to comment.