...
 
Commits (2)
# Override first bin dir
export PATH=~/bin:$PATH
# Override first bin directory
# Depending on your distro, your ~/.profile may already be providing
# this information
if [ -d "$HOME/bin" ]
then
if [[ "$PATH" =~ "$HOME/bin" ]]
then
# Do nothing
:
else
export PATH="$HOME/bin:$PATH"
fi
fi
if [ -d "$HOME/.local/bin" ]
then
if [[ "$PATH" =~ "$HOME/.local/bin" ]]
then
# Do nothing
:
else
export PATH="$HOME/.local/bin:$PATH"
fi
fi
# Remove duplicates in $PATH, if they exist
typeset -U path
HIST_STAMPS="yyyy/mm/dd"
# The following line changes the command execution time stamp shown in
# the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
HIST_STAMPS='%Y/%m/%d'
......@@ -3,7 +3,7 @@
setopt EXTENDED_HISTORY
# Now ignore duplicates in the history
setopt HIST_IGNORE_ALL_DUPS
# Ignore gaps too
# Prevent recording a history entry if preceded with at least one space
setopt HIST_IGNORE_SPACE
# Don't store invocations of 'history' in the history
setopt HIST_NO_STORE
......@@ -20,7 +20,3 @@ HISTFILE=~/.zsh_history
HISTSIZE=2000
# Save 1000 commands
SAVEHIST=1000
# Remove / from the default WORDCHARS
WORDCHARS=$(echo $WORDCHARS | tr -d '/')
# If a command takes a combined time of > 10 seconds, zsh will report it...
REPORTTIME=10
# Use a bunch of colors
# Use a bunch of colors in screen
if [ "$TERM" = "screen" ]
then
export TERM="screen-256color-s"
else
export TERM="xterm-256color"
fi
# Add directory colors
if [ -x /usr/bin/dircolors ]; then
eval "$(dircolors -b)"
alias ls='ls --color=auto'
alias dir='dir --color=auto'
alias ls='ls --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
fi
......@@ -3,22 +3,20 @@ autoload -Uz compinit
compinit
# A handy-dandy function for reloading completions we might hack on
compreload ()
{
function compreload() {
ARG="$1"
unfunction _$ARG
autoload _$ARG
}
# Bash-style null glob result -> no error
#setopt null_glob
zstyle ':completion:*' auto-description 'specify: %d'
zstyle ':completion:*' completer _expand _complete _correct _approximate
zstyle ':completion:*' format 'Completing %d'
#zstyle ':completion:*' group-name ''
# For autocompletion with an arrow-key driven interface. ?
# To activate the menu, press Tab twice.
#zstyle ':completion:*' menu select=2
#eval "$(dircolors -b)"
#zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
#zstyle ':completion:*' list-colors ''
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
......@@ -33,4 +31,3 @@ zstyle ':completion:*' verbose true
# Add custom completion scripts
fpath=(~/.zsh/completion $fpath)
# Oh My ZSH plugins to load
plugins=(colored-man-pages colorize command-not-found gitfast screen zsh-syntax-highlighting)
# Which plugins would you like to load?
# Standard plugins can be found in ~/.zsh/oh-my-zsh/plugins/*
# Custom plugins may be added to ~/.zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
colored-man-pages
colorize
command-not-found
gitfast
screen
zsh-syntax-highlighting
)
# Treat the ‘#’, ‘~’ and ‘^’ characters as part of patterns
# for filename generation, etc. (An initial unquoted ‘~’ always
# produces named directory expansion.)
setopt EXTENDED_GLOB
......@@ -2,8 +2,8 @@
test "x$HOSTNAME" = "x" && export HOSTNAME=$(hostname)
export VISUAL=/usr/bin/vim
export EDITOR=/usr/bin/vim
export GIT_EDITOR=/usr/bin/vim
export VISUAL=/usr/bin/vim
export SHELL=/bin/zsh
......@@ -7,6 +7,5 @@ ZSH_CUSTOM=$HOME/.zsh/custom
# Set cache directory
ZSH_CACHE=$HOME/.zsh/cache
# User configuration
# oh-my-zsh configuration
source $ZSH/oh-my-zsh.sh
# Useful functions
mcd () { mkdir -p "$1"; cd "$1"; }
# Initiate git project with the specified license and commit
function make-project() { mcd "$1"; git init; cp /usr/share/common-licenses/$2 COPYING; git add COPYING; git commit -m "This project is under the $2 licence at this time"; }
odx () { od -t x4 -A x "$@" ; }
# mkdir and cd into it
function mcd() { mkdir -p "$1"; cd "$1"; }
odx1 () { od -t x1 -A x "$@" ; }
# Git related handy-handy stuff
make-project () { mcd "$1"; git init; cp /usr/share/common-licenses/$2 COPYING; git add COPYING; git commit -m "This project is under the $2 licence at this time"; }
# Dump files in hexadecimal, 4 bytes per integer
function odx() { od -t x4 -A x "$@"; }
# Dump files in hexadecimal, 1 byte per integer
function odx1() { od -t x1 -A x "$@"; }
# Alias definitions.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
# Source bash alias definitions, if they exist
if [ -f ~/.bash_aliases ]
then
source ~/.bash_aliases
fi
......@@ -2,4 +2,3 @@
# We do this because:
# - The system has SendEnv set to send locale environment variables to the server, LANG and LC_ALL
alias ssh="/usr/bin/ssh -F ~/.ssh/config"