This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -o errexit -o nounset | |
| PROG="$0" | |
| USAGE="$(cat <<EOF | |
| $PROG encode [-c] [-p] | |
| OPTIONS | |
| -c Copy result after hashing using xclip instead of printing. | |
| -p Paste password using xclip instead of reading from stdin. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -o errexit -o nounset -o errtrace | |
| shopt -s extglob | |
| USAGE="$(cat <<EOF | |
| $0 [-f filename] | |
| OPTIONS | |
| -f Instead of reading from stdin, read from this file. | |
| -c Produce compact instead of pretty-printed JSON. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -o errexit -o nounset -o errtrace | |
| shopt -s extglob | |
| USAGE="$(cat <<EOF | |
| $0 [-x] [-e] | |
| OPTIONS | |
| -x Add "export" before each key=value pair. | |
| -e Escape the character $ in values to prevent parameter expansion when run by a shell. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -o errexit -o nounset | |
| VIM_SRC="${VIM_SRC:-/tmp/vim-sources}" | |
| error() { | |
| local message="${1:-}" | |
| if [[ -n "$message" ]]; then | |
| echo "$message" >&2 | |
| fi |