Eric Sunshine <sunshine@xxxxxxxxxxxxxx> 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.