--machine-parseable added

This commit is contained in:
boyska 2011-11-16 21:10:45 +01:00 committed by Jaromil
parent a66f9ee269
commit b68d28c13b
3 changed files with 6 additions and 3 deletions

View File

@ -155,6 +155,9 @@ Print more information while running, for debugging purposes
.B
.IP "--no-color"
Don't use colors; useful for old terminals or integration in other scripts
.B
.IP "--machine-parseable"
The output is easily parseable via software. This implies --no-color
.SH HOOKS

View File

@ -1662,6 +1662,9 @@ main() {
fi
### End parsing command-specific options
if option_is_set --machine-parseable; then
opts[--no-color]=''
fi
if ! option_is_set --no-color; then
autoload colors; colors
fi

View File

@ -110,9 +110,6 @@ function main() {
while true; do
undertaker_scheme $scheme $keypath
r=$?
if [[ $r == 0 ]]; then
exit 0
fi
if [[ $r == 64 ]]; then
exit 64
fi