Parent directory

droplr.plugin.zsh

345 bytes
 1# Only compatible with MacOS
 2[[ "$OSTYPE" == darwin* ]] || return
 3
 4droplr() {
 5    if [[ $# -eq 0 ]]; then
 6        echo You need to specify a parameter. >&2
 7        return 1
 8    fi
 9
10    if [[ "$1" =~ ^https?:// ]]; then
11        osascript -e 'tell app "Droplr" to shorten "'"$1"'"'
12    else
13        open -ga /Applications/Droplr.app "$1"
14    fi
15}