Shorten --nocolor to --nc.

This commit is contained in:
Arun Prakash Jana 2017-02-10 19:25:05 +05:30
parent bd4b85ad32
commit b7207109bc
No known key found for this signature in database
GPG Key ID: A75979F35C080412
4 changed files with 7 additions and 7 deletions

View File

@ -210,7 +210,7 @@ POWER TOYS:
replace oldtag with newtag everywhere replace oldtag with newtag everywhere
delete oldtag, if no newtag delete oldtag, if no newtag
-j, --json Json formatted output for -p and search -j, --json Json formatted output for -p and search
--nocolor disable color output --nc disable color output
--noprompt do not show the prompt, run and exit --noprompt do not show the prompt, run and exit
-o, --open [...] open bookmarks in browser by DB index -o, --open [...] open bookmarks in browser by DB index
accepts indices and ranges accepts indices and ranges

View File

@ -26,7 +26,7 @@ _buku () {
-l --lock -l --lock
-m --merge -m --merge
--markdown --markdown
--nocolor --nc
--noprompt --noprompt
-o --open -o --open
--oa --oa

2
buku.1
View File

@ -196,7 +196,7 @@ is omitted.
.BI \-j " " \--json .BI \-j " " \--json
Output data formatted as json, works with --print output and search results. Output data formatted as json, works with --print output and search results.
.TP .TP
.BI \--nocolor .BI \--nc
Disable color output in all messages. Useful on terminals which can't handle ANSI color codes or scripted environments. Disable color output in all messages. Useful on terminals which can't handle ANSI color codes or scripted environments.
.TP .TP
.BI \--noprompt .BI \--noprompt

View File

@ -2503,7 +2503,7 @@ POSITIONAL ARGUMENTS:
replace oldtag with newtag everywhere replace oldtag with newtag everywhere
delete oldtag, if no newtag delete oldtag, if no newtag
-j, --json Json formatted output for -p and search -j, --json Json formatted output for -p and search
--nocolor disable color output --nc disable color output
--noprompt do not show the prompt, run and exit --noprompt do not show the prompt, run and exit
-o, --open [...] open bookmarks in browser by DB index -o, --open [...] open bookmarks in browser by DB index
accepts indices and ranges accepts indices and ranges
@ -2526,7 +2526,7 @@ POSITIONAL ARGUMENTS:
addarg('-f', '--format', type=int, default=0, choices={1, 2, 3}, help=HIDE) addarg('-f', '--format', type=int, default=0, choices={1, 2, 3}, help=HIDE)
addarg('-r', '--replace', nargs='+', help=HIDE) addarg('-r', '--replace', nargs='+', help=HIDE)
addarg('-j', '--json', action='store_true', help=HIDE) addarg('-j', '--json', action='store_true', help=HIDE)
addarg('--nocolor', action='store_true', help=HIDE) addarg('--nc', action='store_true', help=HIDE)
addarg('--noprompt', action='store_true', help=HIDE) addarg('--noprompt', action='store_true', help=HIDE)
addarg('-o', '--open', nargs='*', help=HIDE) addarg('-o', '--open', nargs='*', help=HIDE)
addarg('--oa', action='store_true', help=HIDE) addarg('--oa', action='store_true', help=HIDE)
@ -2561,7 +2561,7 @@ POSITIONAL ARGUMENTS:
urllib3.disable_warnings() urllib3.disable_warnings()
# Handle color output preference # Handle color output preference
if args.nocolor: if args.nc:
colorize = False colorize = False
ID_str = '%d. %s [%s]\n' ID_str = '%d. %s [%s]\n'
ID_DB_str = '%d. %s' ID_DB_str = '%d. %s'
@ -2600,7 +2600,7 @@ POSITIONAL ARGUMENTS:
# Initialize the database and get handles, set verbose by default # Initialize the database and get handles, set verbose by default
bdb = BukuDb(args.json, args.format, not args.tacit, bdb = BukuDb(args.json, args.format, not args.tacit,
colorize=not args.nocolor) colorize=not args.nc)
# Editor mode # Editor mode
if args.write is not None: if args.write is not None: