Introduction
Introduction Statistics Contact Development Disclaimer Help
annna-add-hashtag: fail if hashtag contains invalid characters - annna - Annna …
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit ce9c454863fbfb36950d00759ca2fb03b5ca8ed0
parent 9b6d6e1e9710ce4355da444e256d3601e2a87fc8
Author: Anders Damsgaard <[email protected]>
Date: Fri, 9 Apr 2021 20:04:59 +0200
annna-add-hashtag: fail if hashtag contains invalid characters
Signed-off-by: Annna Robert-Houdin <[email protected]>
Diffstat:
M annna-add-hashtag | 6 ++++++
1 file changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/annna-add-hashtag b/annna-add-hashtag
@@ -134,6 +134,12 @@ addtag() {
tag="$1"
uri="$2"
+ if printf '%s' "$1" | grep -qE "[# ',?!]";
+ then
+ printf 'error: tag cannot contain the following characters: # …
+ exit 1
+ fi
+
dltag "$1" "$2"
[ $? -gt 0 ] && return
processtag "$1" "$2"
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.