Skip to content

Commit

Permalink
Fix bug in "c" due to date being part of "l"
Browse files Browse the repository at this point in the history
  • Loading branch information
ylogx committed Aug 3, 2024
1 parent a3d245b commit f383a33
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions home/.bash_aliases
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ hash aria2c 2>/dev/null && alias aria2cm='aria2c -c -x 16'
#alias acki='ack --ignore-dir=build'
alias acki='ack --ignore-dir=build --ignore-dir=doc'

alias c='temp_c() {[[ -d "$1" ]] && l "$1" || cat "$1"}; temp_c'
hash pygmentize 2>/dev/null && alias c='temp_c() {[[ -d "$1" ]] && l "$1" || pygmentize -g "$1"}; temp_c'
hash bat 2>/dev/null && alias c='temp_c() {[[ -d "$1" ]] && l "$1" || bat "$1"}; temp_c'
hash bat 2>/dev/null && alias bp='temp_c() {[[ -d "$1" ]] && l "$1" || bat -P "$1"}; temp_c'
alias c='temp_c() {[[ -d "$1" ]] && ls -ltrFhH "$1" || cat "$1"}; temp_c'
hash pygmentize 2>/dev/null && alias c='temp_c() {[[ -d "$1" ]] && ls -ltrFhH "$1" || pygmentize -g "$1"}; temp_c'
hash bat 2>/dev/null && alias c='temp_c() {[[ -d "$1" ]] && ls -ltrFhH "$1" || bat "$1"}; temp_c'
hash bat 2>/dev/null && alias bp='temp_c() {[[ -d "$1" ]] && ls -ltrFhH "$1" || bat -P "$1"}; temp_c'
hash highlight 2>/dev/null && alias cats='highlight -O ansi'
#alias cdw ^defined above
alias catlatest='cat `ls -t|head -1`'
Expand Down

0 comments on commit f383a33

Please sign in to comment.