Skip to content

Commit

Permalink
Added nala aliases if we decide to use it
Browse files Browse the repository at this point in the history
  • Loading branch information
reilg committed Jul 21, 2022
1 parent 86bf62a commit ee5ff38
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions .aliasrc
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,19 @@ alias gs='git status'
# Add alias for typo of mkdir
alias mkdit='mkdir'

# Some helpers
alias zconfig="vi $HOME/.zshrc"
alias reload="source $HOME/.shrc"
alias paths="sed 's/:/\n/g' <<< \"$PATH\""
alias ag='ag --hidden'

# Check if we have an debian based system
if [ $(command -v apt-get) ]
then
# Alias for system package manager
alias mxpacman='sudo apt-get'
fi

# Some helpers
alias zconfig="vi $HOME/.zshrc"
alias reload="source $HOME/.shrc"
alias paths="sed 's/:/\n/g' <<< \"$PATH\""
alias ag='ag --hidden'

# Check if we have an ubuntu based system
if [ $(command -v apt) ]
then
Expand All @@ -85,6 +85,17 @@ alias mxautoremove='mxpacman autoremove'
# Alias for our mxmaintenance helper
alias mxmaintenance='mxupdate && mxupgrade -y && mxdistupgrade -y && mxautoclean -y && mxautoremove -y'

# If nala is installed overwrite maintenance aliases
if [ $(command -v nala) ]
then
alias mxpacman='sudo nala'
alias mxupdate='mxpacman update'
alias mxinstall='mxpacman install'
alias mxupgrade='mxpacman upgrade'
alias mxautoremove='mxpacman autoremove'
alias mxmaintenance='mxupdate && mxupgrade -y && mxautoremove'
fi

alias mxshutdown='mxmaintenance && shutdown now'

# Alias for easy clipping
Expand All @@ -102,11 +113,11 @@ then
fi

alias gdesc='for line in $(git branch); do
description=$(git config branch.$line.description)
if [ -n "$description" ]; then
echo "\n---"
echo "$line $description"
fi
description=$(git config branch.$line.description)
if [ -n "$description" ]; then
echo "\n---"
echo "$line $description"
fi
done'

if [ $(command -v payrent-dump) ]
Expand Down

0 comments on commit ee5ff38

Please sign in to comment.