diff --git a/README.md b/README.md index 0fef0e7..ceeef6a 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ I can install. * Cross-platform (*3) * Vendor independent (*4) -1) Even chat in multiple workspaces at once. Just open multiple terminal windows nd chat in different cloned chat repos. +1) Even chat in multiple workspaces at once. Just open multiple terminal windows and chat in different cloned chat repos. 2) I could have made it end-2-end encrypted, but have chosen not to, for now, as I find it valuable to have the chat history readable in the remote Git server web-ui. 3) *GitSlick* only requires a terminal, bash and a reasonably new Git (> 2.27 I would guess), which should never be a problem anywhere I work. 4) Any Git Server accessible by all clients will do. diff --git a/chat.sh b/chat.sh index fa99074..3d4ea90 100755 --- a/chat.sh +++ b/chat.sh @@ -15,6 +15,7 @@ commands() { echo -e "${GREEN}/create ${RC} (to create a new #channel)" echo -e "${GREEN}/list${RC} (to list channels)" echo -e "${GREEN}/repeat [n]${RC} (repeat last n messages - default 5)" + echo -e "${GREEN}/post${RC} (write a post aka. multiline message via your regular git message editor)" } welcome() { @@ -25,6 +26,7 @@ welcome() { echo "with NO safety checks or error handling". echo echo "NOTE: Currently only really supports single line messages. Behaviour undefined if pasting multiline content." + echo "But you can now use the ${GREEN}/post${RC} feature if you want to send multiline content." echo echo -e "You are currenty in folder ${RED}$(pwd)${RC}" echo -e "And pushing to ${RED}$(git remote get-url origin --push)${RC}" @@ -67,6 +69,10 @@ while true ; do : "${options:=5}" echo -e "Repeating last $options messages in ${RED}$(git branch --show-current)${RC}" git chatlog "-$options" + elif [ "$cm" = "/post" ]; then + git commit --quiet --allow-empty + git chatlog -1 + git push --quiet origin else message="$cm $options" git commit --quiet --allow-empty --message "$message"