term: Fix wrapper scripts in NixOS. Thanks Tdeo.

This commit is contained in:
Dylan Araps 2019-06-12 20:29:21 +03:00
parent f01ebe4ac8
commit 3e92b3b202
1 changed files with 10 additions and 1 deletions

View File

@ -2882,7 +2882,16 @@ get_term() {
"urxvtd") term="urxvt" ;;
*"nvim") term="Neovim Terminal" ;;
*"NeoVimServer"*) term="VimR Terminal" ;;
*) term="${name##*/}" ;;
*)
term="${name##*/}"
# Fix wrapper names in NixOS.
[[ "$term" == .*-wrapped ]] && {
term="${term#.}"
term="${term%-wrapped}"
}
;;
esac
done