feat: move configuration files inside home folder
This commit is contained in:
15
home/.config/zsh/ohmyzsh/plugins/droplr/droplr.plugin.zsh
Normal file
15
home/.config/zsh/ohmyzsh/plugins/droplr/droplr.plugin.zsh
Normal file
@ -0,0 +1,15 @@
|
||||
# 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
|
||||
}
|
Reference in New Issue
Block a user