1
0
mirror of https://github.com/DazAh/dotfiles synced 2026-05-22 10:35:48 +01:00
Files
dotfiles/exact_dot_oh-my-zsh/exact_plugins/exact_droplr/droplr.plugin.zsh
T
2019-10-13 01:29:05 +01:00

16 lines
345 B
Bash

# Only compatible with MacOS
[[ "$OSTYPE" == darwin* ]] || return
droplr() {
if [[ $# -eq 0 ]]; then
echo You need to specify a parameter. >&2
return 1
fi
if [[ "$1" =~ ^https?:// ]]; then
osascript -e 'tell app "Droplr" to shorten "'"$1"'"'
else
open -ga /Applications/Droplr.app "$1"
fi
}