This repository has been archived on 2024-06-19. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles-old/dot_oh-my-zsh/plugins/qrcode/qrcode.plugin.zsh

18 lines
486 B
Bash
Raw Normal View History

# Imported and improved from https://qrcode.show/, section SHELL FUNCTIONS
_qrcode_show_message() {
echo "Type or paste your text, add a new blank line, and press ^d"
}
qrcode () {
local input="$*"
[ -z "$input" ] && _qrcode_show_message && local input="@/dev/stdin"
curl -d "$input" https://qrcode.show
}
qrsvg () {
local input="$*"
[ -z "$input" ] && _qrcode_show_message && local input="@/dev/stdin"
curl -d "$input" https://qrcode.show -H "Accept: image/svg+xml"
}