Suggests to automatically use clipboard content as default input
Opened this issue · 0 comments
edentsai commented
Thanks for this useful workflow.
Here are the steps I use aflred-url2md:
- Copy a URL into clipboard.
- Open Alfred
- Type the keyword
url
to choose alfred-url2md workflow. - Press Command-V to paste URL.
- Press Enter
With clipboard content as default input,
We can just skip the step 4 to paste a URL into Alfred.
Here is my solution:
#!/bin/zsh
- query=$1
+ query="${1:-""}"
+ if [[ "${query}" == "" ]]; then
+ query="$(pbpaste)"
+ fi
...
When user doesn't input an URL,
just use pbpaste
to get clipboard board
thanks