[bin] Use clipboard if no parameter is given to gitlab-shortcutter

This commit is contained in:
Sebastian Schulze 2022-07-12 21:05:00 +02:00
parent e8686612db
commit 46d11ecac7
No known key found for this signature in database
GPG Key ID: F6BA63C6A7D3044E
1 changed files with 3 additions and 0 deletions

View File

@ -1,6 +1,9 @@
#!/usr/bin/env bash
url="${1}"
if [ -z "${url}" ]; then
url=$(wl-paste)
fi;
shortcode=$(get-gitlab-shortcode "${url}")
markdown="[${shortcode}](${url})"
echo $markdown | wl-copy