Skip to content

Commit

Permalink
PATH declaration cleanup
Browse files Browse the repository at this point in the history
All PATH modifying places moved to single place.
  • Loading branch information
smoorg committed Dec 23, 2023
1 parent a8a16c8 commit 94ba733
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 70 deletions.
110 changes: 51 additions & 59 deletions .bash_aliases
Original file line number Diff line number Diff line change
@@ -1,80 +1,72 @@
#!/bin/sh

[ -f $HOME/.bash_aliases_priv ] && source $HOME/.bash_aliases_priv

#dotnet
alias dotnet-ef=$HOME/.dotnet/tools/dotnet-ef

#tmux - force 256 colors mode
alias tmux='tmux -2'

#scripts

alias cdrepo='cd $(repocd)'

# programs
alias vnc='remmina'
#alias datagrip='setsid -f /home/matr/Programs/DataGrip-2022.3.2/bin/datagrip.sh &'

alias castget='castget -C ~/.config/castget/castget.conf'
alias news='newsboat ; pkill -RTMIN+10 dwmblocks'

alias xlog='less $HOME/.local/share/xorg/Xorg.0.log'
alias xlog1='less $HOME/.local/share/xorg/Xorg.1.log'
alias ll="ls -l --color"

[ -f $HOME/.bash_aliases_priv ] && source $HOME/.bash_aliases_priv
# home git folder
alias dot='git -C .dotfiles/ --work-tree=$HOME'

alias ll="ls -l --color"
# docker stop all
alias dkill='docker stop $(docker ps -q)'

# git

# add
alias gap='git add . --patch'
# fetch
alias gf='git fetch'
alias gfa='git fetch --all'
# push
alias gp='git push -u origin "$(git branch --show-current)"'
alias gpf='git push -u origin "$(git branch --show-current)" -f'
# branch
alias gbl='git branch -l'
alias gbd='git branch -D'
alias gb='git branch'
# checkout
alias gc='git checkout'
alias gcb='git checkout -b'
alias gcp='git checkout -p'
# status
alias gs='git status'
# commit
alias gcm='git commit'
alias gcma='git commit --amend'
alias gcmane='git commit --amend --no-edit'
# rebase
alias gr='git rebase --commiter-date-is-author-date'
alias grc='git rebase --continue'
alias gra='git rebase --abort'

# reset
alias grp='git reset -p'
# log
alias grl='git reflog'
alias gl="git log --color --date=iso --format=fuller"
# diff
alias gd="git diff"
alias gds="git diff --staged"
# add
alias gap='git add . --patch'

# fetch
alias gf='git fetch'
alias gfa='git fetch --all'

# push
alias gp='git push -u origin "$(git branch --show-current)"'
alias gpf='git push -u origin "$(git branch --show-current)" -f'

# branch
alias gbl='git branch -l'
alias gbd='git branch -D'
alias gb='git branch'

# checkout
alias gc='git checkout'
alias gcb='git checkout -b'
alias gcp='git checkout -p'

# status
alias gs='git status'

# commit
alias gcm='git commit'
alias gcma='git commit --amend'
alias gcmane='git commit --amend --no-edit'

# rebase
alias gr='git rebase --commiter-date-is-author-date'
alias grc='git rebase --continue'
alias gra='git rebase --abort'

# reset
alias grp='git reset -p'

# log
alias grl='git reflog'
alias gl="git log --color --date=iso --format=fuller"

# diff
alias gd="git diff"
alias gds="git diff --staged"

# show all git aliases
alias gal='cat $HOME/.bash_aliases | grep "alias g"'

alias dot='git -C .dotfiles/ --work-tree=$HOME'

# docker stop all
alias dkill='docker stop $(docker ps -q)'
16 changes: 9 additions & 7 deletions .bash_params_dev
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,19 @@ DOTNET_TOOLS=$HOME/.dotnet/tools

# javascript
YARN_GLOBAL=$(yarn global bin)
source /usr/share/nvm/init-nvm.sh

# ruby
export GEM_HOME=$HOME/.cache/gem
# Load Ruby Version Manager (RVM) into a shell session *as a function*
#if [[ -s "$HOME/.rvm/scripts/rvm" ]]; then
# export PATH="$PATH:$HOME/.rvm/bin"
# source "$HOME/.rvm/scripts/rvm"
# rvm use 2.7.7
#fi

# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
RVM="$PATH:$HOME/.rvm/bin"

export GOPRIVATE=gitlab.com/readly-ab/*

export PATH=$PATH:$DOTNET_TOOLS:$YARN_GLOBAL:$DEVKITPRO

# Added by Toolbox App
TOOLBOX=$HOME/.local/share/JetBrains/Toolbox/scripts

export PATH=$PATH:$DOTNET_TOOLS:$YARN_GLOBAL:$DEVKITPRO:$RVM:$TOOLBOX
2 changes: 0 additions & 2 deletions .bash_profile
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@
#

[[ -f ~/.bashrc ]] && . ~/.bashrc

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
2 changes: 0 additions & 2 deletions .bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,3 @@ if [ `tty` = /dev/tty1 ]; then
ssh-agent startx
fi

# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"

0 comments on commit 94ba733

Please sign in to comment.