Skip to content

Commit

Permalink
Fix GNU screen detection for *-bce
Browse files Browse the repository at this point in the history
Also use POSIX shell syntax: lighter and the script might be sourced.

Ref: morhetz#4
  • Loading branch information
blueyed committed Dec 9, 2013
1 parent 2847de5 commit c18437b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions gruvbox_256palette.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
#!/bin/sh

if [[ "$TERM" == "screen" || "$TERM" == "screen-256color" ]]; then
if [[ -n "$TMUX" ]]; then
if [ "${TERM%%-*}" = "screen" ]; then
if [ -n "$TMUX" ]; then
echo -ne "\ePtmux;\e\e]4;235;rgb:28/28/28\a\e\\"
echo -ne "\ePtmux;\e\e]4;237;rgb:3c/38/36\a\e\\"
echo -ne "\ePtmux;\e\e]4;239;rgb:50/49/45\a\e\\"
Expand Down
6 changes: 3 additions & 3 deletions gruvbox_256palette_osx.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
#!/bin/sh

if [[ "$TERM" == "screen" || "$TERM" == "screen-256color" ]]; then
if [[ -n "$TMUX" ]]; then
if [ "${TERM%%-*}" = "screen" ]; then
if [ -n "$TMUX" ]; then
echo -ne "\x1bPtmux;\x1b\x1b]4;235;rgb:28/28/28\a\x1b\\"
echo -ne "\x1bPtmux;\x1b\x1b]4;237;rgb:3c/38/36\a\x1b\\"
echo -ne "\x1bPtmux;\x1b\x1b]4;239;rgb:50/49/45\a\x1b\\"
Expand Down

0 comments on commit c18437b

Please sign in to comment.