dotfiles/bin/executable_get-gitlab-short...

10 lines
183 B
Bash

#!/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