add freebsd compatibility
parent
c1286ae05d
commit
3c02975ccc
|
@ -1,9 +0,0 @@
|
|||
alias dotfiles='git --git-dir=$HOME/dotfiles.git/ --work-tree=$HOME'
|
||||
alias nokeyssh="ssh -o PubkeyAuthentication=no"
|
||||
UNAME_S=`uname -s`
|
||||
if [[ "$UNAME_S" == "Linux" || "$UNAME_S" == "CYGWIN_NT-10.0" ]] ; then
|
||||
alias ls="ls --color=auto"
|
||||
fi
|
||||
if [[ "$UNAME_S" == "BSD" || "$UNAME_S" == "Darwin" ]] ; then
|
||||
alias ls="ls -G"
|
||||
fi
|
21
.bashrc
21
.bashrc
|
@ -4,15 +4,20 @@ case $- in
|
|||
*) return;;
|
||||
esac
|
||||
|
||||
if [ -d "/usr$HOME" ] ; then export HOME=/usr$HOME ; cd ; fi
|
||||
if [ -x /usr/bin/resizewin ] ; then /usr/bin/resizewin -z ; fi
|
||||
|
||||
test -f /etc/bashrc && . /etc/bashrc || true
|
||||
test -f /etc/bash.bashrc && . /etc/bash.bashrc || true
|
||||
test -f /etc/bash_completion && . /etc/bash_completion || true
|
||||
[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh"
|
||||
test -f $HOME/.bash_aliases && . $HOME/.bash_aliases || true
|
||||
test -f $HOME/.cargo/env && . $HOME/.cargo/env || true
|
||||
if [ -e $HOME/.nix-profile/etc/profile.d/nix.sh ]; then . $HOME/.nix-profile/etc/profile.d/nix.sh; fi
|
||||
|
||||
EDITOR=vim
|
||||
alias dotfiles='git --git-dir=$HOME/dotfiles.git/ --work-tree=$HOME'
|
||||
|
||||
EDITOR=vim; export EDITOR
|
||||
PAGER=less; export PAGER
|
||||
PATH=$PATH:$HOME/.local/bin:$HOME/bin
|
||||
GIT_MERGE_AUTOEDIT=no
|
||||
|
||||
|
@ -55,9 +60,9 @@ PROMPT_COMMAND="history -a"
|
|||
shopt -s histappend
|
||||
|
||||
function _update_ps1() {
|
||||
PS1="$(powerline-go -error $?)"
|
||||
PS1="$(powerline-rs --modules user,host,ssh,cwd,git,gitstage,root --shell bash $?)"
|
||||
}
|
||||
if [[ $(which powerline-go 2>/dev/null) && "$TERM" != "linux" && "$TERM_PROGRAM" != "vscode" ]]; then
|
||||
if [[ $(which powerline-rs 2>/dev/null) && "$TERM" != "linux" && "$TERM_PROGRAM" != "vscode" ]]; then
|
||||
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
|
||||
else
|
||||
PS1='[\[\033[01;32m\]\u@\h\[\033[00m\] \[\033[01;34m\]\w$(__git_ps1 " (%s)")\[\033[00m\]]\$ '
|
||||
|
@ -67,5 +72,13 @@ for i in $HOME/bin/*.bash ; do
|
|||
. $i
|
||||
done
|
||||
|
||||
if which lsd > /dev/null 2>&1 ; then
|
||||
if [ "$TERM" = "xterm-256color" ] ; then
|
||||
alias ls="lsd"
|
||||
else
|
||||
alias ls="lsd --icon=never"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Set up direnv
|
||||
eval "$(direnv hook bash)"
|
||||
|
|
Reference in New Issue