forked from colonelpanic/dotfiles
Make shellenv directory.
This commit is contained in:
parent
9b44d35171
commit
5a178299a1
@ -1,5 +1,9 @@
|
||||
source ~/.lib/shellrc/functions.sh
|
||||
source ~/.lib/shellrc/emacs.sh
|
||||
source ~/.lib/shellenv/functions.sh
|
||||
|
||||
for filename in ~/.lib/shellenv/*; do
|
||||
source $filename
|
||||
done
|
||||
|
||||
function add_to_front_of_path {
|
||||
export PATH=$@:$(echo $PATH | sed "s|:*$@||g" | sed "s|^:||")
|
||||
}
|
||||
@ -34,6 +38,6 @@ add_to_back_of_path "/usr/local/sbin"
|
||||
# Load RVM into a shell session *as a function*
|
||||
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
|
||||
|
||||
function shellrc {
|
||||
function with_shellrc {
|
||||
zsh -c "source ~/.zshrc && ""$@"
|
||||
}
|
||||
|
@ -1,3 +1,9 @@
|
||||
shell_contains () {
|
||||
local e
|
||||
for e in "${@:2}"; do [[ "$e" == "$1" ]] && return 0; done
|
||||
return 1
|
||||
}
|
||||
|
||||
function dotfiles_directory() {
|
||||
echo $(dirname `readlink -f ~/.zshrc | xargs dirname`)
|
||||
}
|
Loading…
Reference in New Issue
Block a user