term: Fix wrapper scripts in NixOS. Thanks Tdeo.

This commit is contained in:
Dylan Araps 2019-06-12 20:41:12 +03:00
parent 2caec13bf3
commit 4f727b1de3

View file

@ -2887,9 +2887,9 @@ get_term() {
term="${name##*/}"
# Fix wrapper names in NixOS.
[[ "$term" == .*-wrap* ]] && {
[[ "$distro" == NixOS* && $term == .*-* ]] && {
term="${term#.}"
term="${term%-wrap*}"
term="${term%-*}"
}
;;
esac