dotfiles

Personal dotfiles
git clone https://git.bracken.jp/dotfiles.git
Log | Files | Refs | LICENSE

commit dae13e31c850d2432d8c71c89295406b522ae23b
parent f574e49fe0293f01abe8bc15f595f3d844c20ec4
Author: Chris Bracken <chris@bracken.jp>
Date:   Tue,  1 Dec 2015 22:56:18 -0800

Ensure procfs is available. Set TERM to xterm-256 for urxvt.

Diffstat:
M.zshrc | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/.zshrc b/.zshrc @@ -53,9 +53,16 @@ else fi unset color_prompt force_color_prompt +# If procfs is available, get the terminal executable +term_bin="" +if [[ -e /proc/$PPID/cmdline ]]; then + term_bin="${$(</proc/$PPID/cmdline):t}" +fi + if [[ "$COLORTERM" = "gnome-terminal" ]] || \ [[ "$TERM_PROGRAM" = "iTerm.app" ]] || \ - [[ ${$(</proc/$PPID/cmdline):t} == gnome-terminal* ]]; then + [[ "$term_bin" == gnome-terminal* ]] || \ + [[ "$term_bin" == urxvt* ]]; then export TERM=xterm-256color fi