mirror of
https://github.com/notwa/rc
synced 2025-02-05 07:43:22 -08:00
smart PATH handling, BRACE_CCL
This commit is contained in:
parent
818b32c75d
commit
ea6c0463cf
3 changed files with 8 additions and 3 deletions
2
bashrc
2
bashrc
|
@ -30,6 +30,6 @@ PROMPT_COMMAND='[ $? = 0 ] && PS1=${ret_succ} || PS1=${ret_fail}'
|
||||||
. ~/shrc.zsh
|
. ~/shrc.zsh
|
||||||
|
|
||||||
# this doesn't work for all scripts at the moment, but
|
# this doesn't work for all scripts at the moment, but
|
||||||
PATH="$PATH:$HOME/sh"
|
ADDPATH "$HOME/sh"
|
||||||
|
|
||||||
unset x
|
unset x
|
||||||
|
|
6
shrc.zsh
6
shrc.zsh
|
@ -2,7 +2,11 @@
|
||||||
|
|
||||||
umask 027 # screw others
|
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
|
# cleanup in case of inherited exports
|
||||||
for x in AR CC CPP CXX CFLAGS CPPFLAGS CXXFLAGS LDFLAGS RANLIB RC WINDRES; do
|
for x in AR CC CPP CXX CFLAGS CPPFLAGS CXXFLAGS LDFLAGS RANLIB RC WINDRES; do
|
||||||
|
|
3
zshrc
3
zshrc
|
@ -55,6 +55,7 @@ function {
|
||||||
complete_aliases # allow original command completion within alias
|
complete_aliases # allow original command completion within alias
|
||||||
complete_in_word # enable tab completion when cursor between words
|
complete_in_word # enable tab completion when cursor between words
|
||||||
rc_quotes # 'you''re dumb' like "you're dumb"
|
rc_quotes # 'you''re dumb' like "you're dumb"
|
||||||
|
brace_ccl # for character ranges like {a-z}
|
||||||
)
|
)
|
||||||
setopt "${opts[@]}"
|
setopt "${opts[@]}"
|
||||||
unsetopt rm_star_silent rm_star_wait # yolo
|
unsetopt rm_star_silent rm_star_wait # yolo
|
||||||
|
@ -99,7 +100,7 @@ reload() {
|
||||||
rm -f .zcompdump
|
rm -f .zcompdump
|
||||||
[ -f .zshrc.zwc.old ] && rm -f .zshrc.zwc.old
|
[ -f .zshrc.zwc.old ] && rm -f .zshrc.zwc.old
|
||||||
[ -f .zcompdump.zwc.old ] && rm -f .zcompdump.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
|
unset x
|
||||||
|
|
Loading…
Add table
Reference in a new issue