From: Junio C Hamano Date: Wed, 05 Aug 2020 22:14:39 GMT Subject: Re: [PATCH 1/3] mergetool-lib: use $XDG_CURRENT_DESKTOP to check GNOME Message-ID: In-Reply-To: Eric Sunshine writes: > Rather than looping and mucking with IFS, even easier would be: > > is_desktop () { > case ":$XDG_CURRENT_DESKTOP:" in > *:$1:*) return 0 ;; > *) return 1 ;; > esac > } > > But perhaps that's too magical for people? Nah, that is exactly how 'case' in shell is supposed to be used. Thanks.