Updates reference config with a bunch of os and shell safety. #1
42
.bashrc
42
.bashrc
@@ -73,48 +73,6 @@ xterm*|rxvt*)
|
||||
;;
|
||||
esac
|
||||
|
||||
## Begin .rc.d stuff
|
||||
|
||||
PATH="/home/tom/Android/android-studio/bin:$PATH"
|
||||
## Source all scripts in ~/.rc.d
|
||||
for f in ~/.rc.d/*.sh; do
|
||||
source "$f"
|
||||
done
|
||||
# TODO: do the same for ~/.rc.d/*.bash to only do bash scripts or make the scripts figure out what shell they are under.
|
||||
|
||||
## Autocompletion
|
||||
|
||||
# enable programmable completion features (you don't need to enable
|
||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||
# sources /etc/bash.bashrc). This is after .rc.d stuff because that may have changed the available completions.
|
||||
if ! shopt -oq posix; then
|
||||
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||
. /usr/share/bash-completion/bash_completion
|
||||
elif [ -f /etc/bash_completion ]; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
fi
|
||||
|
||||
## Functions
|
||||
|
||||
## Paths
|
||||
|
||||
# Append personal bin to path
|
||||
# if [ -d "$HOME/bin" ] ; then
|
||||
# PATH="$HOME/bin:$PATH"
|
||||
# fi
|
||||
|
||||
# Append local personal bin to path
|
||||
# if [ -d "$HOME/.local/bin" ] ; then
|
||||
# PATH="$HOME/.local/bin:$PATH"
|
||||
# fi
|
||||
|
||||
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
|
||||
|
||||
# Load Angular CLI autocompletion.
|
||||
source <(ng completion script)
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
[alias]
|
||||
amend = commit --amend --no-edit
|
||||
br = branch
|
||||
brr = branch -r
|
||||
co = checkout
|
||||
@@ -17,7 +16,7 @@
|
||||
[init]
|
||||
defaultBranch = main
|
||||
[pull]
|
||||
ff = only
|
||||
ff = only
|
||||
[user]
|
||||
name = Tom Hicks
|
||||
email = headhunter3@gmail.com
|
||||
|
||||
@@ -26,7 +26,7 @@ alias lld='ls -l -d'
|
||||
alias lsg='ls | grep'
|
||||
alias llg='ls -l | grep'
|
||||
if is_macos; then alias ln='ln -ivw'
|
||||
elif is_linux; alias ln='ln -iv'; fi
|
||||
elif is_linux; then alias ln='ln -iv'; fi
|
||||
if is_linux; then
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='grep --color=auto -F'
|
||||
@@ -200,8 +200,9 @@ install_user_bin() {
|
||||
mkdir -p "$HOME/bin"
|
||||
cp "$1" "$HOME/bin/"
|
||||
}
|
||||
alias build_and_test='cmake -S . -B build && cmake --build build -- -j$(nproc) && ctest --test-dir build --output-on-failure'
|
||||
|
||||
# TODO: move these and the bazel ones to separate .sh files.
|
||||
alias build_and_test='cmake -S . -B build && cmake --build build -- -j$(nproc) && ctest --test-dir build --output-on-failure'
|
||||
alias inspect-video='mediainfo --Inform="Video;Codec: %Format%\nProfile: %Format_Profile%\nResolution: %Width%x%Height%\nBitrate: %BitRate/String%\nBitrate mode: %BitRate_Mode%\nFrame rate: %FrameRate% fps\n"'
|
||||
alias wget-rip='wget --page-requisites --convert-links --adjust-extension --no-clobber --span-hosts'
|
||||
alias wget-rip='wget --page-requisites --convert-links --adjust-extension --no-clobber --span-hosts -r -l1'
|
||||
|
||||
Reference in New Issue
Block a user