From aff332d58c41084399310e5e9d259777703dd04b Mon Sep 17 00:00:00 2001 From: tilman Date: Thu, 14 Nov 2024 23:33:02 +0100 Subject: [PATCH] change exit codes --- xdg-desktop-search | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xdg-desktop-search b/xdg-desktop-search index e53eae8..8654a1a 100755 --- a/xdg-desktop-search +++ b/xdg-desktop-search @@ -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: