Debian Codegraph @

sensible-terminal

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2 # Copyright 2007 Jari Aalto;
3 # Copyright 2019-2022 Bastien Roucariès
4
5 # Prevent recursive loops, where environment variables are set to this script
6 [scip-shell system . . `[`. -n "$__SENSIBLE_TERMINAL" ] && exit 126
7 __SENSIBLE_TERMINAL="$0"
8 export __SENSIBLE_TERMINAL
9
10 Tryscip-shell shell sensible-utils 0.0.26 Try().()
11 {
12 [scip-shell system . . `[`. -z "$__sensible_candidate" ] && return
13 eval "$__sensible_candidate \"\$@\""; ret=$?
14 # 127=ENOENT, 126=couldn't exec for another reason
15 [scip-shell system . . `[`. "$ret" -ne 126 ] && [scip-shell system . . `[`. "$ret" -ne 127 ] && exit "$ret"
16 unset ret
17 }
18
19 for __sensible_candidate in "$TERMINAL_EMULATOR" "$SENSIBLE_TERMINAL_EMULATOR"; do
20 Tryscip-shell shell sensible-utils 0.0.26 Try(). "$@"
21 done
22
23 if [scip-shell system . . `[`. -n "$XDG_CURRENT_DESKTOP" ]; then
24 __sensible_candidate="sensible-terminal-$(echoscip-shell system . . echo. "$XDG_CURRENT_DESKTOP" | trscip-shell system . . tr. '[:upper:]' '[:lower:]')"
25 command -v "$__sensible_candidate" > /dev/nullscip-shell filesystem . . `/dev/null`. && Tryscip-shell shell sensible-utils 0.0.26 Try(). "$@"
26 fi
27
28 __sensible_candidate=x-terminal-emulator
29 Tryscip-shell shell sensible-utils 0.0.26 Try(). "$@"
30
31 command -v gettext > /dev/nullscip-shell filesystem . . `/dev/null`. || alias gettext='printf %s'
32 # shellcheck disable=SC2016
33 TEXTDOMAIN=sensible-utils gettextscip-shell system . . gettext. 'Couldn'\''t find a terminal emulator!
34 Set the $TERMINAL_EMULATOR environment variable to your desired terminal emulator.
35 ' >&2
36 exit 1