Skip to content

Commit

Permalink
fix: add third column to aliases command to show usage
Browse files Browse the repository at this point in the history
  • Loading branch information
cerico committed May 3, 2023
1 parent 324816d commit 6322c65
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions files/zsh/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ aliases () {
[ -f ~/.zsh/$1 ] && f=$1 || f="_trialling"
echo $(ColorCyan ${f:u})
echo $(ColorCyan -------------)
grep '^[[:alpha:]].*{' ~/.zsh/$f | tr -cd '[:alnum:]# ._\n' | sort | awk -F"#" '{printf "\033[0;38m%-10s\t\033[1;36m%s\n", $1, $2}'
grep '^[[:alpha:]].*{' ~/.zsh/$f | tr -cd '[:alnum:]# ._\n' | sort | awk -F"#" '{printf "\033[0;38m%-10s\t\033[1;36m%s\t\033[0;32m%s\n", $1, $2, $3}'
else
for i in $(ls ~/.zsh | grep -v "\." | grep -v trialling)
do
echo $(ColorCyan ${i:u})
echo $(ColorCyan -------------)
grep '^[[:alpha:]].*{' ~/.zsh/$i | tr -cd '[:alnum:]# ._\n' | sort | awk -F"#" '{printf "\033[0;38m%-10s\t\033[1;36m%s\n", $1, $2}'
grep '^[[:alpha:]].*{' ~/.zsh/$i | tr -cd '[:alnum:]# ._\n' | sort | awk -F"#" '{printf "\033[0;38m%-10s\t\033[1;36m%s\t\033[0;32m%s\n", $1, $2, $3}'
echo ""
done
fi
Expand Down Expand Up @@ -199,7 +199,7 @@ isp () {
geo $1 | jq -r '.data.geo.isp'
}

recent () {
recent () { # Find most recent directories containing a file with specified filename # ➜ recent 12 astro.config.mjs
[[ $1 = [1-9]* ]] && num=$1 || num=10
[[ $1 = [.[:alpha:]]* ]] && f=$1 || f='.git'
[[ $2 = [1-9]* ]] && num=$2
Expand Down

0 comments on commit 6322c65

Please sign in to comment.