Skip to content

Commit

Permalink
Use exa only if installed (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
topher200 authored Feb 11, 2024
1 parent 73dccab commit f622cc1
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions files/topherrc
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ alias fdh='fdfind -H'
alias vim=nvim
alias gg=lazygit
alias lg=lazygit
alias ls="exa"
alias ll="exa -al"
alias rg='rg --smart-case --no-messages'
alias rgh="rg --smart-case --no-messages --hidden -g '!.git/'"
alias sgp=/home/gitpod/.dotfiles/start-tmux-and-install-slow-packages.sh
Expand All @@ -28,6 +26,22 @@ export LESS="-F -X $LESS"
alias '$'=''
alias '$ '=''

# use exa if installed, otherwise use ls
ls() {
if command -v exa >/dev/null 2>&1; then
exa "$@"
else
command ls "$@"
fi
}
ll() {
if command -v exa >/dev/null 2>&1; then
exa -al "$@"
else
command ls -al "$@"
fi
}

# Delete the current branch you're on, leaving you on a detached HEAD
function gdcb {
branch_name=$(git symbolic-ref HEAD --short)
Expand Down

0 comments on commit f622cc1

Please sign in to comment.