update
This commit is contained in:
parent
1de687b22b
commit
102dadb552
14
bash/bashrc
14
bash/bashrc
@ -97,9 +97,9 @@ fi
|
|||||||
## IF MacOS
|
## IF MacOS
|
||||||
if [[ $(uname) == "Darwin" ]]; then
|
if [[ $(uname) == "Darwin" ]]; then
|
||||||
# PATH
|
# PATH
|
||||||
if [ -d /opt/homebrew/bin ]; do
|
if [ -d /opt/homebrew/bin ]; then
|
||||||
export PATH="/opt/homebrew/bin:$PATH"
|
export PATH="/opt/homebrew/bin:$PATH"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Google Stuff
|
# Google Stuff
|
||||||
@ -139,7 +139,11 @@ function h() {
|
|||||||
|
|
||||||
# Check Starship is installed
|
# Check Starship is installed
|
||||||
if which starship &>/dev/null; then
|
if which starship &>/dev/null; then
|
||||||
eval "$(starship init zsh)"
|
if [ $SHELL == '/bin/zsh' ]; then
|
||||||
|
eval "$(starship init zsh)"
|
||||||
|
elif [ $SHELL == '/bin/bash' ]; then
|
||||||
|
eval "$(starship init bash)"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "Starship not Installed, Install with: curl -sS https://starship.rs/install.sh | sh"
|
echo "Starship not Installed, Install with: curl -sS https://starship.rs/install.sh | sh"
|
||||||
fi
|
fi
|
||||||
@ -150,7 +154,7 @@ export PATH="$PATH:/Users/errol/.local/bin"
|
|||||||
|
|
||||||
for bcfile in ~/.bash_completion.d/*; do
|
for bcfile in ~/.bash_completion.d/*; do
|
||||||
[ -f "$bcfile" ] && . $bcfile
|
[ -f "$bcfile" ] && . $bcfile
|
||||||
if [ -d "$bcfile" ]; do
|
if [ -d "$bcfile" ]; then
|
||||||
for subbc in $bcfile/*; do
|
for subbc in $bcfile/*; do
|
||||||
[[ -f "$subbc" ]] && . $subbc
|
[[ -f "$subbc" ]] && . $subbc
|
||||||
done
|
done
|
||||||
|
@ -1,52 +1,52 @@
|
|||||||
|
# ~/.aliasrc - Compatible with Bash and Zsh
|
||||||
|
|
||||||
|
# Array containing all alias definitions as strings
|
||||||
alias_list=(
|
alias_list=(
|
||||||
|
# General Shell Aliases
|
||||||
|
"ll='ls -alF'"
|
||||||
|
"ls='ls -lah --color'"
|
||||||
|
"grep='grep --color=auto'"
|
||||||
|
"vi='vim'"
|
||||||
|
"lpg='cd ~/git/lucidpoint'"
|
||||||
|
"ppg='cd ~/git/personal'"
|
||||||
|
"downloads='cd ~/Downloads'"
|
||||||
|
"desktop='cd ~/Desktop'"
|
||||||
|
"docs='cd ~/Documents'"
|
||||||
|
"pip='pip3'"
|
||||||
|
"python='python3'"
|
||||||
|
|
||||||
# ZSH
|
# PYTHON
|
||||||
ll='ls -alF'
|
"ve='source venv/bin/activate'"
|
||||||
ls='ls -lah --color'
|
|
||||||
grep='grep --color=auto'
|
|
||||||
vi='vim'
|
|
||||||
lpg='cd ~/git/lucidpoint'
|
|
||||||
ppg='cd ~/git/personal'
|
|
||||||
downloads='cd ~/Downloads'
|
|
||||||
desktop='cd ~/Desktop'
|
|
||||||
docs='cd ~/Documents'
|
|
||||||
pip='pip3'
|
|
||||||
python='python3'
|
|
||||||
|
|
||||||
# PYTHON
|
# GIT
|
||||||
ve='source venv/bin/activate'
|
"gaa='git add --all'"
|
||||||
|
"gcm='git commit --all --message'"
|
||||||
|
"glo='git log --oneline --decorate --graph --all'"
|
||||||
|
"gl='git pull'"
|
||||||
|
"gp='git push'"
|
||||||
|
"gpd='git push --dry-run'"
|
||||||
|
"gpv='git push --verbose'"
|
||||||
|
"grb='git rebase'"
|
||||||
|
"grv='git remote --verbose'"
|
||||||
|
"gs='git show --pretty=short'"
|
||||||
|
"gst='git status --short'"
|
||||||
|
"gd='git diff'"
|
||||||
|
"gdca='git diff --cached'"
|
||||||
|
"gdcw='git diff --cached --word-diff'"
|
||||||
|
"gds='git diff --staged'"
|
||||||
|
"gdw='git diff --word-diff'"
|
||||||
|
|
||||||
# GIT
|
# SSH
|
||||||
gaa='git add --all'
|
"ed='ssh errol@edesktop.sancaktar.net'"
|
||||||
gcm='git commit --all --message'
|
"fs='ssh errol@fs1.sancaktar.net'"
|
||||||
glo='git log --oneline --decorate --graph --all'
|
|
||||||
gl='git pull'
|
|
||||||
gp='git push'
|
|
||||||
gpd='git push --dry-run'
|
|
||||||
gpv='git push --verbose'
|
|
||||||
grb='git rebase'
|
|
||||||
grv='git remote --verbose'
|
|
||||||
gs='git show --pretty=short'
|
|
||||||
gst='git status --short'
|
|
||||||
gd='git diff'
|
|
||||||
gdca='git diff --cached'
|
|
||||||
gdcw='git diff --cached --word-diff'
|
|
||||||
gds='git diff --staged'
|
|
||||||
gdw='git diff --word-diff'
|
|
||||||
|
|
||||||
# SSH
|
# Kubernetes
|
||||||
ed='ssh errol@edesktop.sancaktar.net'
|
"k='kubectl'"
|
||||||
fs='ssh errol@fs1.sancaktar.net'
|
# Terraform/Tofu
|
||||||
|
"t='tofu'"
|
||||||
# Kubernetes
|
|
||||||
k='kubectl'
|
|
||||||
# Terraform/Tofu
|
|
||||||
t='tofu'
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# Alias Functions
|
# Alias Functions
|
||||||
|
|
||||||
gc() {
|
gc() {
|
||||||
git add --all
|
git add --all
|
||||||
if [ -n "$1" ]
|
if [ -n "$1" ]
|
||||||
@ -58,10 +58,14 @@ gc() {
|
|||||||
git push --verbose
|
git push --verbose
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Alias Loop
|
|
||||||
for alias_def in "${alias_list[@]}"; do
|
for alias_def in "${alias_list[@]}"; do
|
||||||
alias $alias_def
|
if [ -n "$BASH_VERSION" ]; then
|
||||||
|
eval "alias $alias_def"
|
||||||
|
elif [ -n "$ZSH_VERSION" ]; then
|
||||||
|
alias ${alias_def}
|
||||||
|
else
|
||||||
|
eval "alias $alias_def"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
unset alias_list alias_def
|
||||||
|
Loading…
Reference in New Issue
Block a user