[bin] Rework get-gitlab-shortcode-as-markdown in plain bash

This commit is contained in:
Sebastian Schulze 2022-07-06 20:18:05 +02:00
parent 50ca954565
commit d7122a4a5c
No known key found for this signature in database
GPG Key ID: F6BA63C6A7D3044E
1 changed files with 5 additions and 6 deletions

View File

@ -1,7 +1,6 @@
#!/usr/bin/env ruby
#!/usr/bin/env bash
url = ARGV.first.strip
shortcode=`get-gitlab-shortcode #{url}`.strip
markdown = "[#{shortcode}](#{url})"
puts markdown
`wl-copy #{markdown}`
url="${1}"
shortcode=$(get-gitlab-shortcode "${url}")
markdown="[${shortcode}](${url})"
echo $markdown | wl-copy