From a6c0fe3ca8a2366ed26234034e2a78132e584b7d Mon Sep 17 00:00:00 2001
From: Martin Dosch
Date: Fri, 11 Nov 2022 17:54:00 +0100
Subject: [PATCH] Add short option `-h` for http-upload.
---
CHANGELOG.md | 2 ++
README.md | 2 +-
main.go | 2 +-
man/go-sendxmpp.1 | 2 +-
man/go-sendxmpp.1.html | 2 +-
man/go-sendxmpp.1.ronn | 2 +-
6 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2291c50..810a292 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,8 @@
# Changelog
## Unreleased
+### Added
+- Add short option `-h` for http-upload.
### Changed
- Fix Ox key generation.
diff --git a/README.md b/README.md
index 196570b..2aab0ce 100644
--- a/README.md
+++ b/README.md
@@ -90,7 +90,7 @@ Usage: go-sendxmpp [-cdilnt] [-a value] [-f value] [--help] [--http-upload value
-f, --file=value Set configuration file. (Default:
~/.config/go-sendxmpp/sendxmpprc)
--help Show help.
- --http-upload=value
+ -h, --http-upload=value
Send a file via http-upload.
-i, --interactive Interactive mode (for use with e.g. 'tail -f').
-j, --jserver=value
diff --git a/main.go b/main.go
index ad01636..fa7abf4 100644
--- a/main.go
+++ b/main.go
@@ -84,7 +84,7 @@ func main() {
// Define command line flags.
flagHelp := getopt.BoolLong("help", 0, "Show help.")
- flagHTTPUpload := getopt.StringLong("http-upload", 0, "", "Send a file via http-upload.")
+ flagHTTPUpload := getopt.StringLong("http-upload", 'h', "", "Send a file via http-upload.")
flagDebug := getopt.BoolLong("debug", 'd', "Show debugging info.")
flagServer := getopt.StringLong("jserver", 'j', "", "XMPP server address.")
flagUser := getopt.StringLong("username", 'u', "", "Username for XMPP account.")
diff --git a/man/go-sendxmpp.1 b/man/go-sendxmpp.1
index 4689a5c..511c388 100644
--- a/man/go-sendxmpp.1
+++ b/man/go-sendxmpp.1
@@ -36,7 +36,7 @@ Set configuration file\. (Default: ~/\.config/go\-sendxmpp/config)
.P
Show help\.
.TP
-\fB\-\-http\-upload=\fR[\fIvalue\fR]:
+\fB\-h\fR, \fB\-\-http\-upload=\fR[\fIvalue\fR]:
.P
Send a file via http\-upload\.
diff --git a/man/go-sendxmpp.1.html b/man/go-sendxmpp.1.html
index 3de63a1..156beb9 100644
--- a/man/go-sendxmpp.1.html
+++ b/man/go-sendxmpp.1.html
@@ -133,7 +133,7 @@ file location is specified with -f
or --file
.
-
-
--http-upload=
[value]:
+-h
, --http-upload=
[value]:
diff --git a/man/go-sendxmpp.1.ronn b/man/go-sendxmpp.1.ronn
index 7196cfd..57554c1 100644
--- a/man/go-sendxmpp.1.ronn
+++ b/man/go-sendxmpp.1.ronn
@@ -36,7 +36,7 @@ Set configuration file. (Default: ~/.config/go-sendxmpp/config)
Show help.
-* `--http-upload=`[]:
+* `-h`, `--http-upload=`[]:
Send a file via http-upload.