Switch to Zsh & Oh-My-Zsh

Here’s another piece of shell ‘coolness’… used by this old geek.

Oh My Zsh is a delightful, open source, community-driven framework for managing your Zsh configuration :

  1. Here is their Website. This site is a full, traditional (yes, elegant) Linux web support, documentation site.
  2. Here is their GitHub page. This page offers excellent instructions on installation and basic use.

Here are reference sites on zsh to help you understand why you might want to use it, rather than something else.

I did a bit of research and based on my discovery(ies) I changed my .profile to reflect a check for bash, zsh or something else, rather than a simple check for bash-only. Here is the reference I followed (it may be wrong, I’m no expert). Anyway it seems to work:

Here’s my revised .profile (use it at your own risk.).

# ~/.profile: executed by the command interpreter for login shells.
# Edited for Lilidog to add /sbin and /usr/sbin to path for shell.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022

# if running bash
#if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
# if [ -f "$HOME/.bashrc" ]; then
# . "$HOME/.bashrc"
# fi
#fi

# check if running bash or zsh or something else
if [ -n "$($SHELL -c 'echo $ZSH_VERSION')" ]; then
# assume Zsh
. "$HOME/.zshrc"
elif [ -n "$($SHELL -c 'echo $BASH_VERSION')" ]; then
# assume Bash
. "$HOME/.bashrc"
else
# assume something else
fi


# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi

# include sbin in PATH
if [ -d "/sbin" ] ; then
PATH="${PATH:+${PATH}:}/sbin"
fi

if [ -d "/usr/sbin" ] ; then
PATH="${PATH:+${PATH}:}/usr/sbin"
fi

Here’s a proof of life scrot:

Remember, like with all of my work, I am able to provide the following assurance(s):
  • It is almost certainly going to work until it breaks; although I have to admit it may never work and that would be sad.
  • When/if it does break, you may keep all of the pieces.
  • If you find my materials helpful, both you & I will be happy, at least for a little while.
  • My advice is worth every penny you paid for it!