Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #31 from polyphemus/exitcancel

Exit with return code 2 when dialog selection was canceled
  • Loading branch information...
commit 7b6c395e91aa6c43b94a77994bffd4d9c9e2cffa 2 parents 7ac0fa8 + 19a6106
@ghost1227 authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/cdm
View
3  src/cdm
@@ -40,6 +40,7 @@ warn() { (printf ' \033[01;33m*\033[00m '; echo "$name: $*") > /dev/stderr; }
error() { (printf ' \033[01;31m*\033[00m '; echo "$name: $*") > /dev/stderr; }
exitnormal() { exit 0; }
exiterror() { sleep 1; exit 1; }
+exitcancel() { exit 2; }
yesno()
{
[ -z "$1" ] && return 1
@@ -138,7 +139,7 @@ case "${#binlist[@]}" in
--cancel-label ' Exit ' --menu 'Select session' 0 0 0 "${menu[@]}"
)
if [[ $? != 0 ]]; then
- clear; exitnormal
+ clear; exitcancel
fi
clear
let binindex-=countfrom

0 comments on commit 7b6c395

Please sign in to comment.
Something went wrong with that request. Please try again.