From e9a9d1c0644aac2427c69cb24f6bdd24eb70bb64 Mon Sep 17 00:00:00 2001 From: James Magahern Date: Thu, 10 Aug 2023 00:42:49 -0700 Subject: [PATCH] prompt: adds 'version' command --- prompt/prompt.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/prompt/prompt.go b/prompt/prompt.go index 12822ec..2950656 100644 --- a/prompt/prompt.go +++ b/prompt/prompt.go @@ -176,6 +176,8 @@ func (p *Prompt) StartInteractive() error { } p.receiveMessage(args[1], body) + case line == "version": // Version + fmt.Printf("Server version: %s\n", p.server.Version()) case line == "help": // Help fmt.Println("Usage: [args]") fmt.Println("Where is specified, '*' can be provided as a wildcard.") @@ -185,6 +187,7 @@ func (p *Prompt) StartInteractive() error { fmt.Println("\tls list messages for conversation") fmt.Println("\tmark [-r] mark conversation as unread/[r]ead") fmt.Println("\trecv receive a message") + fmt.Println("\tversion print server version") fmt.Println("\thelp show this help") fmt.Println("\texit exits the program")