1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-05-18 09:53:22 -07:00

smart PATH handling, BRACE_CCL

This commit is contained in:
Connor Olding 2013-07-01 02:22:36 -07:00
parent 818b32c75d
commit ea6c0463cf
3 changed files with 8 additions and 3 deletions

2
bashrc
View File

@ -30,6 +30,6 @@ PROMPT_COMMAND='[ $? = 0 ] && PS1=${ret_succ} || PS1=${ret_fail}'
. ~/shrc.zsh
# this doesn't work for all scripts at the moment, but
PATH="$PATH:$HOME/sh"
ADDPATH "$HOME/sh"
unset x

View File

@ -2,7 +2,11 @@
umask 027 # screw others
export PATH="$PATH:$HOME/opt/local/bin"
ADDPATH() {
grep ":$1:" <<<":$PATH:" >/dev/null || export PATH="$PATH:$1"
}
ADDPATH "$HOME/opt/local/bin"
# cleanup in case of inherited exports
for x in AR CC CPP CXX CFLAGS CPPFLAGS CXXFLAGS LDFLAGS RANLIB RC WINDRES; do

3
zshrc
View File

@ -55,6 +55,7 @@ function {
complete_aliases # allow original command completion within alias
complete_in_word # enable tab completion when cursor between words
rc_quotes # 'you''re dumb' like "you're dumb"
brace_ccl # for character ranges like {a-z}
)
setopt "${opts[@]}"
unsetopt rm_star_silent rm_star_wait # yolo
@ -99,7 +100,7 @@ reload() {
rm -f .zcompdump
[ -f .zshrc.zwc.old ] && rm -f .zshrc.zwc.old
[ -f .zcompdump.zwc.old ] && rm -f .zcompdump.zwc.old
exec zsh # reload zsh (ends script execution)
exec zsh # reload shell, inheriting environment
}
unset x