Thread (1 message) 1 message, 1 author, 2020-08-05

Re: [PATCH 1/3] mergetool-lib: use $XDG_CURRENT_DESKTOP to check GNOME

From: Junio C Hamano <hidden>
Date: 2020-08-05 22:14:47

Eric Sunshine [off-list ref] 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help