diff --git a/home/-shrc b/home/-shrc index 54ff3a8..fba059f 100644 --- a/home/-shrc +++ b/home/-shrc @@ -37,12 +37,11 @@ ify() { $@ | $ex } -has() { which "$1" >&/dev/null && which "$1"; } +has() { which "$1" >/dev/null && which "$1"; } # cleanup in case of inherited exports -for x in AR CC CPP CXX CFLAGS CPPFLAGS CXXFLAGS LDFLAGS RANLIB RC WINDRES; do - unset $x -done +unset PREFIX CC CPP CXX LD CFLAGS CPPFLAGS CXXFLAGS LDFLAGS +unset AR RANLIB RC WINDRES OBJDUMP OBJCOPY COMPILER_PATH [ "$LANG" != "en_US.UTF-8" ] && [ "$LANG" != "en_CA.UTF-8" ] && echo "Warning: LANG is $LANG" @@ -53,8 +52,8 @@ done [[ "$DESKTOP_SESSION" == xfce ]] && export QT_QPA_PLATFORMTHEME="" export PREFIX="$HOME/opt/local" -export CC="$(has clang || has clang-3.6 || has gcc)" -export CXX="$(has clang++ || has clang++-3.6 || has g++)" +export CC="$(has clang || has clang-3.8 || has gcc)" +export CXX="$(has clang++ || has clang++-3.8 || has g++)" #export CFLAGS='-march=native -O2' #export LDFLAGS='-Wl,-O1,--sort-common,-z,relro' #export CFLAGS="$CFLAGS -I'$HOME/opt/local/include'" @@ -71,6 +70,7 @@ export EDITOR='vim' for x in ls dir vdir grep fgrep egrep; do alias $x="$x --color=auto" done +unset x #alias make="$(has colormake || has make)" # just flags diff --git a/home/bashrc b/home/bashrc index a3fe472..7f90f56 100644 --- a/home/bashrc +++ b/home/bashrc @@ -28,7 +28,6 @@ ret_fail="$_title${Cfail}$_line1\n${Cfail}$_line2" PROMPT_COMMAND='[ $? = 0 ] && PS1=${ret_succ} || PS1=${ret_fail}' . ~/.-shrc -unset x # this doesn't work for all scripts at the moment, but ADDPATH "$HOME/sh" diff --git a/home/zshrc b/home/zshrc index e1ed500..e687faf 100644 --- a/home/zshrc +++ b/home/zshrc @@ -137,6 +137,7 @@ for x in ack cd cp ebuild gcc gist grep ln man mkdir mv rm alias $x="nocorrect $x" for x in arith hex curl fc find ftp history let locate rsync scp sftp wget twitch hitbox yt alias $x="noglob $x" +unset x if [[ "$TERM" = xterm* ]]; then precmd() { print -Pn "\e]2;%M: %~\a" } @@ -164,7 +165,5 @@ reload() { exec zsh # reload shell, inheriting environment } -unset x - [ -e "/home/$USER/opt/local/bin/torch-activate" ] && \ . "/home/$USER/opt/local/bin/torch-activate"