use cat << EOF to print usage and version
This commit is contained in:
17
sxbm
17
sxbm
@ -43,8 +43,9 @@ die() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
printf "Usage: $APPNAME <command> [<args>]\n"
|
cat << EOF
|
||||||
printf "
|
Usage: $APPNAME <command> [<args>]
|
||||||
|
|
||||||
COMMANDS:
|
COMMANDS:
|
||||||
add <link> [title] [+tags]
|
add <link> [title] [+tags]
|
||||||
ls|list [-s|--strict] [-c|--disable-colors] [title] [+tags]
|
ls|list [-s|--strict] [-c|--disable-colors] [title] [+tags]
|
||||||
@ -52,13 +53,17 @@ COMMANDS:
|
|||||||
rm|remove <line_num>
|
rm|remove <line_num>
|
||||||
edit
|
edit
|
||||||
-h|--help print this text and exit
|
-h|--help print this text and exit
|
||||||
-v|--version print the version and exit\n\n"
|
-v|--version print the version and exit
|
||||||
|
|
||||||
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
version() {
|
version() {
|
||||||
printf "$APPNAME $VERSION\n"
|
cat << EOF
|
||||||
printf "GPLv3 license\n"
|
$APPNAME $VERSION
|
||||||
printf "https://github.com/n-r-k/sxbm\n"
|
GPLv3 license
|
||||||
|
https://github.com/n-r-k/sxbm
|
||||||
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
bm_add() {
|
bm_add() {
|
||||||
|
|||||||
Reference in New Issue
Block a user