refactor .bash{rc,_profile}

This commit is contained in:
masterzu 2019-11-26 11:35:32 +01:00
parent 52e2b32def
commit f2cf09a787
2 changed files with 36 additions and 4 deletions

24
.bash_profile Normal file
View File

@ -0,0 +1,24 @@
echo ">> .bash_profile"
## rust cargo
test -d HOME/.cargo/bin && PATH="$HOME/.cargo/bin:$PATH"
## nodejs
test -d ~/.local_node/bin && PATH="$HOME/.local_node/bin:$PATH"
# golang env
export GOPATH=/home/patrick/devel/golang
PATH="$GOPATH/bin:$PATH" ## bin installed from `go install`
PATH="/home/patrick/src/golang/go/bin:$PATH" ## install from binaries
# rvm
#[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
# nix
if [ -e /home/patrick/.nix-profile/etc/profile.d/nix.sh ]; then . /home/patrick/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer
test -s $HOME/.bashrc && source $HOME/.bashrc
export PATH=".:$HOME/bin:$HOME/.local/bin:$PATH"
echo "<< .bash_profile"

16
.bashrc
View File

@ -9,8 +9,6 @@ echo ">> .bashrc"
export MAIL=/var/mail/$USER
export MAILCHECK=30
export EDITOR=vim
export LANG=fr_FR.UTF-8
# history : don't put duplicate lines in the history. Ignore line begin with space
@ -56,7 +54,9 @@ DEFAULT_COLOR="\[\033[00m\]"
PROMPT_COMMAND='PS1="[\u@\h] -- \w "; echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
# I love google-chrome :)
export BROWSER=google-chrome
# export BROWSER=google-chrome
# but w3m is lighter
export BROWSER=w3m
# ... and vim
export EDITOR=vim
@ -81,7 +81,7 @@ test -f ~/dotfiles/.dircolors && eval "`dircolors ~/dotfiles/.dircolors`"
export MANPATH=$HOME/.local/share/man:
# added by Nix installer
if [ -e /home/patrick/.nix-profile/etc/profile.d/nix.sh ]; then . /home/patrick/.nix-profile/etc/profile.d/nix.sh; fi
# od it in .bash_profile if [ -e /home/patrick/.nix-profile/etc/profile.d/nix.sh ]; then . /home/patrick/.nix-profile/etc/profile.d/nix.sh; fi
# autolaunch tmux
# https://wiki.archlinux.org/index.php/Tmux#Bash
@ -103,5 +103,13 @@ export GPG_TTY
# fuzzyFinder FIXME bloque la completion
# [ -f ~/.fzf.bash ] && source ~/.fzf.bash
### tuir / fork of rtv : reddit terminal Viewer
export TUIR_BROWSER=urlportal.sh
export TUIR_URLVIEWER=urlview
# PATH
export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
echo "<< .bashrc"
# end .bashrc