My Terminal Environment

I use a lightly modified version of oh-my-zsh

Different ZSH Configs per OS

I use a different configuration on all my Linux computers than on my Macbook. This are the packages I use for Arch/Debian and for MacOS. Also note how I change my config across operating systems.

case `uname` in
    # MacOS Config
        plugins=(zsh-autosuggestions git osx colored-man
                colorize brew pip python command-not-found)
    # Linux Config
        plugins=(git zsh-autosuggestions colored-man autojump)

Automatically print ls on cd

I like to automatically print the directory listing when I change directories. This should be fixed at some stage so that after resources .zshrc it doesn’t print it twice.

auto-ls () {
    emulate -L zsh;
    # explicit sexy ls'ing as aliases arent honored in here.
    hash gls >/dev/null 2>&1 && CLICOLOR_FORCE=1 gls -aFh --color --group-directories-first || ls
chpwd_functions=( auto-ls $chpwd_functions )

Retrieving Local and Public IP

alias whatsmyip="wget -qO- ; echo"
alias localip="ip a | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v ''"

Python Webserver Oneliner

alias pyhttp='python3 -m http.server 7420 || python -m SimpleHTTPServer 7420 || echo "Python not installed"'

Terminal Australian Radio

alias radioabcnews="mplayer -playlist" #
alias radiobbcnews="mplayer -playlist" #
alias radiorn="mplayer -playlist" #
alias radiojjj="mplayer -playlist" #
alias radiobbcnews="mplayer -playlist" #
alias radiosleepbot="mplayer -playlist" # Sleepbot Environmental Broadcast 56K MP3