Functions and Aliases

A collection of bash/zsh/etc. shell functions and aliases

ipaddr

Use ip command to list active network interface addresses.

ip -br a

catwhere

Show the contents of the script that can be found in path with where.

function catwhere() { cat $(where $1) }

datelast

Function to output TZ-agnostic ISO datetime for the last weekday (and optionally time.)

function datelast() { date +%Y-%m-%dT%H:%M --date "last $*" }

yesterday

Function to output TZ-agnostic ISO datetime for “yesterday.”

function yesterday() { date +%Y-%m-%dT%H:%M --date "yesterday $*" }

duhere

Return the disk usage for the folders in current directory.

du -h --max-depth=1 ./ | sort -h

showcal

Show calendar for current month from Remind.

remind -c ~/.reminders