Skip to content

Latest commit

 

History

History
113 lines (80 loc) · 2.52 KB

zsh-env.org

File metadata and controls

113 lines (80 loc) · 2.52 KB

ZShell Environment Startup File

This startup file is always loaded, even for non-interactive shell scripts, so this file should be light and only contain environment variable settings.

Note: I could use this to store any functions that I want to share between my other scripts, but so far I haven’t thought of anything.

Environment Variables

Path to the Oh My Zsh configuration.

ZSH=$HOME/.oh-my-zsh

Use my own Happiness Zsh theme (stored in the ~/.oh-my-zsh/themes directory.

ZSH_THEME="happiness"

Disable autosetting terminal title.

DISABLE_AUTO_TITLE="true"

Displays red dots while waiting for completion.

COMPLETION_WAITING_DOTS="true"

Disable bi-weekly auto-update checks of Oh My Zsh. This has caused problems for me. I will update by hand.

DISABLE_AUTO_UPDATE="true"

History

We will let the HISTFILE variable as it is.

SAVEHIST=1000
HISTSIZE=1000

Options

See this page for all options. Why would you type ‘cd dir’ if you could just type ‘dir’?

setopt AUTOCD

Of course, it is much more useful with settings for $CD PATH. However, it takes the full path of the directory and that isn’t that helpful, so we’ll leave cdpath pretty much alone:

cdpath=( . ~ )

The following makes cd = pushd

setopt AUTOPUSHD

When you type in things, being case insensitive sounds like a good idea:

setopt NO_CASE_GLOB
setopt NO_CASE_MATCH
setopt EXTENDEDGLOB

I don’t like every tab on my terminal sharing the same history.

setopt NO_SHARE_HISTORY
setopt APPEND_HISTORY

Call the Profile

Machine specific information (like environment variable information) should be stored in the ~/.profile. I thought that Zshell automatically sourced that, but it appears not.

if [[ -f $HOME/.profile ]]
then
    source $HOME/.profile
fi

Technical Gunk

The following are the tangled settings. Type: C-c C-v t to create the script file.