diff options
author | Ismael Luceno | 2021-05-24 14:54:01 +0200 |
---|---|---|
committer | Ismael Luceno | 2021-05-24 14:54:14 +0200 |
commit | ba2b03846715778dc4305b77af5aa439e43dac11 (patch) | |
tree | 162e4bb79e0859c5ea29537e7c0d047fe34140fb | |
parent | 716b074a93ef600ce0a91fbf4d7ee1a0639d858b (diff) |
quill: Simplify parsing of Github URLs
Extract the name using a fixed index; counting from the end can vary the
relative index in case of full refs.
Fixes: 4668bcd70ba8 ("quill: Fix parsing of Github URLs")
-rwxr-xr-x | usr/bin/quill | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/bin/quill b/usr/bin/quill index 79167cf..7380ba3 100755 --- a/usr/bin/quill +++ b/usr/bin/quill @@ -105,7 +105,7 @@ if [[ -z $QUILL_TARGET ]]; then ;; https://github.com/*/archive/*) SPELL_SRC_URL="$1" - QUILL_ORIG_TARGET=$(awk -F/ '{print $(NF-2)}' <<< "$1") + QUILL_ORIG_TARGET=$(awk -F/ '{print $5}' <<< "$1") ;; *:*) SPELL_SRC_URL="$1" |