mirror of
https://github.com/nikdoof/dotfiles.git
synced 2025-12-14 02:02:29 +00:00
[shell-common] Cleanup tabs vs spaces
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
# OSX aliases
|
||||
if [[ $(uname) == "Darwin" ]]; then
|
||||
alias ls="ls -FG"
|
||||
alias code="code-insiders"
|
||||
alias ls="ls -FG"
|
||||
alias code="code-insiders"
|
||||
alias flushdns="sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder"
|
||||
else
|
||||
alias ls="ls -F --color=auto"
|
||||
alias ls="ls -F --color=auto"
|
||||
fi
|
||||
|
||||
alias t='(tmux has-session 2>/dev/null && tmux attach) || (tmux new-session)'
|
||||
alias tma="tmux attach"
|
||||
alias last="last | head"
|
||||
alias last="last | head"
|
||||
|
||||
@@ -8,37 +8,37 @@ export LANG=en_GB.UTF-8
|
||||
|
||||
# Make a sensible editor choice
|
||||
if [ -x /usr/bin/nano ]; then
|
||||
export EDITOR=nano
|
||||
export VISUAL=nano
|
||||
export EDITOR=nano
|
||||
export VISUAL=nano
|
||||
else
|
||||
export EDITOR=vi
|
||||
export VISUAL=vi
|
||||
export EDITOR=vi
|
||||
export VISUAL=vi
|
||||
fi
|
||||
|
||||
# Go stuff
|
||||
export GOPATH=$HOME/go/
|
||||
export PATH=${GOPATH}bin:$PATH
|
||||
if [ -z ${GOROOT+x} ] && [ -d /usr/local/go ]; then
|
||||
export GOROOT=/usr/local/go/
|
||||
export PATH=$PATH:$HOME/go/bin
|
||||
export GOROOT=/usr/local/go/
|
||||
export PATH=$PATH:$HOME/go/bin
|
||||
fi
|
||||
|
||||
# https://github.com/oz/tz
|
||||
if [ -f $HOME/go/bin/tz ]; then
|
||||
export TZ_LIST="America/New_York,America/Los_Angeles,Europe/Paris"
|
||||
export TZ_LIST="America/New_York,America/Los_Angeles,Europe/Paris"
|
||||
fi
|
||||
|
||||
# OSX Specific envs
|
||||
if [[ $(uname) == "Darwin" ]]; then
|
||||
# M1 specific hacks
|
||||
if [[ $(uname -p) == "arm" ]]; then
|
||||
# Stop golang progs having fun with Rosetta 2 (https://yaleman.org/post/2021/2021-01-01-apple-m1-terraform-and-golang/)
|
||||
export GODEBUG=asyncpreemptoff=1
|
||||
fi
|
||||
# M1 specific hacks
|
||||
if [[ $(uname -p) == "arm" ]]; then
|
||||
# Stop golang progs having fun with Rosetta 2 (https://yaleman.org/post/2021/2021-01-01-apple-m1-terraform-and-golang/)
|
||||
export GODEBUG=asyncpreemptoff=1
|
||||
fi
|
||||
|
||||
# Python user bin folder
|
||||
[ -d $HOME/Library/Python/3.9/bin ] && export PATH=$PATH:$HOME/Library/Python/3.9/bin
|
||||
|
||||
# Homebrew
|
||||
[ -d /opt/homebrew ] && eval $(/opt/homebrew/bin/brew shellenv)
|
||||
# Python user bin folder
|
||||
[ -d $HOME/Library/Python/3.9/bin ] && export PATH=$PATH:$HOME/Library/Python/3.9/bin
|
||||
|
||||
# Homebrew
|
||||
[ -d /opt/homebrew ] && eval $(/opt/homebrew/bin/brew shellenv)
|
||||
fi
|
||||
|
||||
@@ -45,7 +45,7 @@ function commit-pkm() {
|
||||
if [ -d $HOME/Documents/pkm ]; then
|
||||
prevdir=$PWD
|
||||
cd ~/Documents/pkm
|
||||
if [[ `git status --porcelain` ]]; then
|
||||
if [[ $(git status --porcelain) ]]; then
|
||||
echo "Changes detected, commiting..."
|
||||
git add -A && git commit -a -m 'Manual savepoint'
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user