mirror of
https://github.com/notwa/rc
synced 2025-02-05 07:43:22 -08:00
rename ~/.-shrc
to ~/.shrc
the reason for the hyphen is that i was originally concerned about random shells executing the file when i didn't want them to. back then, i was only targetting zsh and bash, and therefore `~/.-shrc` was not yet suitable for any other shells. nowadays, `~/.-shrc` is has better shell compatibility, and i'm not actually aware of any shells that would execute `~/.shrc` by default -- `$ENV` is typically required to be set.
This commit is contained in:
parent
23e3e74387
commit
a2ae5a212d
7 changed files with 8 additions and 8 deletions
|
@ -29,7 +29,7 @@ ret_fail="$_title${Cfail}$_line1\n${Cfail}$_line2"
|
||||||
|
|
||||||
PROMPT_COMMAND='[ $? = 0 ] && PS1=${ret_succ} || PS1=${ret_fail}'
|
PROMPT_COMMAND='[ $? = 0 ] && PS1=${ret_succ} || PS1=${ret_fail}'
|
||||||
|
|
||||||
. ~/.-shrc
|
. ~/.shrc
|
||||||
|
|
||||||
# this doesn't work for all scripts at the moment, but
|
# this doesn't work for all scripts at the moment, but
|
||||||
ADDPATH "$HOME/sh"
|
ADDPATH "$HOME/sh"
|
||||||
|
|
|
@ -53,7 +53,7 @@ export EA_AUTH="auth"
|
||||||
export EA_DIR="t"
|
export EA_DIR="t"
|
||||||
export EA_DOMAIN="https://eaguru.guru"
|
export EA_DOMAIN="https://eaguru.guru"
|
||||||
export EDITOR=vim
|
export EDITOR=vim
|
||||||
export ENV="$HOME/.-shrc" # for dash
|
export ENV="$HOME/.shrc" # for dash and ash
|
||||||
export PAGER=less
|
export PAGER=less
|
||||||
export PYTHONIOENCODING=utf-8 # damnit python!
|
export PYTHONIOENCODING=utf-8 # damnit python!
|
||||||
export SSH_AUTH_SOCK=0 # more info: https://0x0.st/NUnw
|
export SSH_AUTH_SOCK=0 # more info: https://0x0.st/NUnw
|
|
@ -195,7 +195,7 @@ else
|
||||||
hash -d py=~/Dropbox/py
|
hash -d py=~/Dropbox/py
|
||||||
fi
|
fi
|
||||||
|
|
||||||
. ~/.-shrc
|
. ~/.shrc
|
||||||
|
|
||||||
alias -g OMFG="1>/dev/null" ### @ OMFG - silence stdout.
|
alias -g OMFG="1>/dev/null" ### @ OMFG - silence stdout.
|
||||||
alias -g STFU="2>/dev/null" ### @ STFU - silence stderr.
|
alias -g STFU="2>/dev/null" ### @ STFU - silence stderr.
|
||||||
|
|
2
install
2
install
|
@ -130,7 +130,7 @@ cd "${HOME:?HOME variable empty or unset}" || die "failed to change directory"
|
||||||
backup_dir="$rc/backup-$(date -u '+%s')"
|
backup_dir="$rc/backup-$(date -u '+%s')"
|
||||||
[ ! -d "$backup_dir" ] || die "backup directory already exists"
|
[ ! -d "$backup_dir" ] || die "backup directory already exists"
|
||||||
|
|
||||||
for f in .bashrc .zshrc .prep .-shrc .prezto-compinit .ls_colors \
|
for f in .shrc .bashrc .zshrc .prep .prezto-compinit .ls_colors \
|
||||||
.vimrc .inputrc .Xresources .screenrc .tmux.conf; do
|
.vimrc .inputrc .Xresources .screenrc .tmux.conf; do
|
||||||
hardlink "$f" "$rc/home/${f#.}"
|
hardlink "$f" "$rc/home/${f#.}"
|
||||||
done
|
done
|
||||||
|
|
|
@ -59,7 +59,7 @@ else
|
||||||
|
|
||||||
#( cd temp; HOME="$rc/temp" dash ./install )
|
#( cd temp; HOME="$rc/temp" dash ./install )
|
||||||
ln temp/home/zshrc temp/.zshrc || die 'failed to copy files'
|
ln temp/home/zshrc temp/.zshrc || die 'failed to copy files'
|
||||||
ln temp/home/-shrc temp/.-shrc || die 'failed to copy files'
|
ln temp/home/shrc temp/.shrc || die 'failed to copy files'
|
||||||
ln temp/home/bashrc temp/.bashrc || die 'failed to copy files'
|
ln temp/home/bashrc temp/.bashrc || die 'failed to copy files'
|
||||||
|
|
||||||
# use new documentation-generating scripts on old shell scripts.
|
# use new documentation-generating scripts on old shell scripts.
|
||||||
|
|
|
@ -63,7 +63,7 @@ compile() { ### @-
|
||||||
### # debug build
|
### # debug build
|
||||||
### compile rd.c
|
### compile rd.c
|
||||||
### compile debug rd.c
|
### compile debug rd.c
|
||||||
### # debug build with warning/error flags defined in .-shrc
|
### # debug build with warning/error flags defined in ~/sh/arrays
|
||||||
### # (requires .zshrc for global alias expansion)
|
### # (requires .zshrc for global alias expansion)
|
||||||
### compile WHOA rd.c
|
### compile WHOA rd.c
|
||||||
### # likewise for C++
|
### # likewise for C++
|
||||||
|
|
|
@ -108,7 +108,7 @@ document1() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# sanity check:
|
# sanity check:
|
||||||
[ -d sh ] && [ -f .zshrc ] && [ -f .-shrc ] && [ -f .bashrc ] || return 3
|
[ -d sh ] && [ -f .zshrc ] && [ -f .shrc ] && [ -f .bashrc ] || return 3
|
||||||
|
|
||||||
# create new output file (with a tilde as not to overwrite just yet):
|
# create new output file (with a tilde as not to overwrite just yet):
|
||||||
: > "$out" || return 4
|
: > "$out" || return 4
|
||||||
|
@ -140,7 +140,7 @@ document1() {
|
||||||
printf '\n## %s\n' 'miscellaneous' >> "$out" || return 5
|
printf '\n## %s\n' 'miscellaneous' >> "$out" || return 5
|
||||||
document2 .zshrc >> "$out" || return
|
document2 .zshrc >> "$out" || return
|
||||||
document2 .bashrc >> "$out" || return
|
document2 .bashrc >> "$out" || return
|
||||||
document2 .-shrc >> "$out" || return
|
document2 .shrc >> "$out" || return
|
||||||
}
|
}
|
||||||
|
|
||||||
document() { ### @-
|
document() { ### @-
|
||||||
|
|
Loading…
Add table
Reference in a new issue