change exit codes
This commit is contained in:
parent
0eb7823f56
commit
aff332d58c
@ -68,7 +68,7 @@ environment variable `XDG_DATA_DIRS`.
|
||||
## RETURN VALUES
|
||||
|
||||
The command returns 0 if .desktop files were found that match the specified
|
||||
criteria, 1 on usage error and 2 if no matching .desktop files were found.
|
||||
criteria, 1 if no matching .desktop files were found and 127 on usage error.
|
||||
|
||||
## EXAMPLE
|
||||
|
||||
@ -139,7 +139,7 @@ parse_options() {
|
||||
-d|--show-directive)
|
||||
[[ $counter -gt $argc ]] && {
|
||||
echo "ERROR: Missing argument for option -d; aborted." >&2 ;
|
||||
exit 1 ;
|
||||
exit 127 ;
|
||||
}
|
||||
show_directives+=( "$1" )
|
||||
shift
|
||||
@ -148,7 +148,7 @@ parse_options() {
|
||||
-s|--search-directive)
|
||||
[[ $counter -gt $argc ]] && {
|
||||
echo "ERROR: Missing argument for option -s; aborted." >&2 ;
|
||||
exit 1 ;
|
||||
exit 127 ;
|
||||
}
|
||||
search_directives+=( "$1" )
|
||||
shift
|
||||
@ -209,7 +209,7 @@ done
|
||||
if [[ $found -gt 0 ]] ; then
|
||||
exit 0
|
||||
else
|
||||
exit 2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# vim: tabstop=2 shiftwidth=2 softtabstop=2 expandtab:
|
||||
|
Loading…
Reference in New Issue
Block a user