Skip to content

Commit

Permalink
aliases/general: cleanup
Browse files Browse the repository at this point in the history
- use `-A` instead of `-a` for `ls`,
- quote variable expansions,
- don’t *assign* default expansions,
- don’t alias `piano` without `pianobar`,
  • Loading branch information
gaelicWizard committed Feb 18, 2022
1 parent 187916d commit 3f041cd
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions aliases/available/general.aliases.bash
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ fi
alias sl=ls
alias la='ls -AF' # Compact view, show hidden
alias ll='ls -al'
alias l='ls -a'
alias l='ls -A'
alias l1='ls -1'
alias lf='ls -F'

alias _='sudo'

# Shortcuts to edit startup files
alias vbrc='${VISUAL:-vim} ~/.bashrc'
alias vbpf='${VISUAL:-vim} ~/.bash_profile'
alias vbrc='"${VISUAL:-vim}" ~/.bashrc'
alias vbpf='"${VISUAL:-vim}" ~/.bash_profile'

# colored grep
# Need to check an existing file for a pattern that will be found to ensure
Expand All @@ -35,20 +35,21 @@ alias c='clear'
alias cls='clear'

alias edit='${EDITOR:-${ALTERNATE_EDITOR?}}'
alias pager='${PAGER:=less}'
alias pager='${PAGER:-less}'

alias q='exit'

alias irc='${IRC_CLIENT:=irc}'
alias irc='${IRC_CLIENT:-irc}'

# Language aliases
alias rb='ruby'
alias py='python'
alias ipy='ipython'

# Pianobar can be found here: http://github.com/PromyLOPh/pianobar/

if _command_exists pianobar; then
alias piano='pianobar'
fi

alias ..='cd ..' # Go up one directory
alias cd..='cd ..' # Common misspelling for going up one directory
Expand All @@ -72,8 +73,8 @@ alias rd='rmdir'
alias xt='extract'

# sudo editors
alias svim='sudo ${VISUAL:-vim}'
alias snano='sudo nano'
alias svim='sudo "${VISUAL:-vim}"'
alias snano='sudo "${ALTERNATE_EDITOR:-nano}"'

# Display whatever file is regular file or folder
function catt() {
Expand Down

0 comments on commit 3f041cd

Please sign in to comment.