Increase heading readability
This commit is contained in:
parent
060d9064f8
commit
9a52ecb21b
|
@ -14,6 +14,10 @@ fi
|
|||
# Load and initialize the completion system ignoring insecure directories.
|
||||
autoload -Uz compinit && compinit -i
|
||||
|
||||
#
|
||||
# Options
|
||||
#
|
||||
|
||||
setopt COMPLETE_IN_WORD # Complete from both ends of a word.
|
||||
setopt ALWAYS_TO_END # Move cursor to the end of a completed word.
|
||||
setopt PATH_DIRS # Perform path search even on command names with slashes.
|
||||
|
@ -26,6 +30,10 @@ unsetopt FLOW_CONTROL # Disable start/stop characters in shell editor.
|
|||
# Treat these characters as part of a word.
|
||||
WORDCHARS='*?_-.[]~&;!#$%^(){}<>'
|
||||
|
||||
#
|
||||
# Styles
|
||||
#
|
||||
|
||||
# Use caching to make completion for cammands such as dpkg and apt usable.
|
||||
zstyle ':completion::complete:*' use-cache on
|
||||
zstyle ':completion::complete:*' cache-path "$HOME/.zcache"
|
||||
|
|
|
@ -6,6 +6,10 @@
|
|||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
#
|
||||
# Options
|
||||
#
|
||||
|
||||
setopt AUTO_CD # Auto changes to a directory without typing cd.
|
||||
setopt AUTO_PUSHD # Push the old directory onto the stack on cd.
|
||||
setopt PUSHD_IGNORE_DUPS # Do not store duplicates in the stack.
|
||||
|
@ -18,7 +22,10 @@ setopt EXTENDED_GLOB # Use extended globbing syntax.
|
|||
unsetopt CLOBBER # Do not overwrite existing files with > and >>.
|
||||
# Use >! and >>! to bypass.
|
||||
|
||||
#
|
||||
# Aliases
|
||||
#
|
||||
|
||||
alias d='dirs -v'
|
||||
for index ({1..9}) alias "$index"="cd +${index}"; unset index
|
||||
|
||||
|
|
|
@ -12,7 +12,9 @@ if (( ! $+commands[dpkg] && ! $+commands[apt-get] )); then
|
|||
return 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Aliases
|
||||
#
|
||||
|
||||
# Cleans the cache.
|
||||
alias debc='sudo apt-get clean && sudo apt-get autoclean'
|
||||
|
|
|
@ -45,6 +45,10 @@ if [[ "$TERM" == 'dumb' ]]; then
|
|||
return 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Options
|
||||
#
|
||||
|
||||
# Beep on error in line editor.
|
||||
setopt BEEP
|
||||
|
||||
|
@ -52,6 +56,10 @@ setopt BEEP
|
|||
autoload -Uz edit-command-line
|
||||
zle -N edit-command-line
|
||||
|
||||
#
|
||||
# Variables
|
||||
#
|
||||
|
||||
# Use human-friendly identifiers.
|
||||
zmodload zsh/terminfo
|
||||
typeset -gA key_info
|
||||
|
@ -93,6 +101,10 @@ for key in "$key_info[@]"; do
|
|||
fi
|
||||
done
|
||||
|
||||
#
|
||||
# Functions
|
||||
#
|
||||
|
||||
# Displays editor information.
|
||||
function editor-info {
|
||||
# Clean up previous $editor_info.
|
||||
|
@ -191,7 +203,10 @@ zle -N prepend-sudo
|
|||
# Reset to default key bindings.
|
||||
bindkey -d
|
||||
|
||||
# Emacs key bindings.
|
||||
#
|
||||
# Emacs Key Bindings
|
||||
#
|
||||
|
||||
for key ("$key_info[Escape]"{B,b}) bindkey -M emacs "$key" emacs-backward-word
|
||||
for key ("$key_info[Escape]"{F,f}) bindkey -M emacs "$key" emacs-forward-word
|
||||
bindkey -M emacs "$key_info[Escape]$key_info[Left]" emacs-backward-word
|
||||
|
@ -220,7 +235,9 @@ if (( $+widgets[history-incremental-pattern-search-backward] )); then
|
|||
history-incremental-pattern-search-forward
|
||||
fi
|
||||
|
||||
# Vi key bindings.
|
||||
#
|
||||
# Vi Key Bindings
|
||||
#
|
||||
|
||||
# Edit command in an external editor.
|
||||
bindkey -M vicmd "v" edit-command-line
|
||||
|
@ -241,7 +258,10 @@ else
|
|||
bindkey -M vicmd "/" history-incremental-search-forward
|
||||
fi
|
||||
|
||||
# Emacs and Vi key bindings.
|
||||
#
|
||||
# Emacs and Vi Key Bindings
|
||||
#
|
||||
|
||||
for keymap in 'emacs' 'viins'; do
|
||||
bindkey -M "$keymap" "$key_info[Home]" beginning-of-line
|
||||
bindkey -M "$keymap" "$key_info[End]" end-of-line
|
||||
|
@ -295,6 +315,10 @@ if zstyle -t ':omz:module:editor' dot-expansion; then
|
|||
bindkey -M isearch . self-insert 2> /dev/null
|
||||
fi
|
||||
|
||||
#
|
||||
# Layout
|
||||
#
|
||||
|
||||
# Set the key layout.
|
||||
zstyle -s ':omz:module:editor' keymap 'keymap'
|
||||
if [[ "$keymap" == (emacs|) ]]; then
|
||||
|
|
|
@ -5,16 +5,25 @@
|
|||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
#
|
||||
# Smart URLs
|
||||
#
|
||||
|
||||
autoload -Uz url-quote-magic
|
||||
zle -N self-insert url-quote-magic
|
||||
|
||||
#
|
||||
# General
|
||||
#
|
||||
|
||||
setopt BRACE_CCL # Allow brace character class list expansion.
|
||||
setopt RC_QUOTES # Allow 'Henry''s Garage' instead of 'Henry'\''s Garage'.
|
||||
unsetopt MAIL_WARNING # Don't print a warning message if a mail file has been accessed.
|
||||
|
||||
#
|
||||
# Jobs
|
||||
#
|
||||
|
||||
setopt LONG_LIST_JOBS # List jobs in the long format by default.
|
||||
setopt AUTO_RESUME # Attempt to resume existing job before creating a new process.
|
||||
setopt NOTIFY # Report status of background jobs immediately.
|
||||
|
@ -22,13 +31,19 @@ unsetopt BG_NICE # Don't run all background jobs at a lower priority.
|
|||
unsetopt HUP # Don't kill jobs on shell exit.
|
||||
unsetopt CHECK_JOBS # Don't report on jobs when shell exit.
|
||||
|
||||
#
|
||||
# Grep
|
||||
#
|
||||
|
||||
if zstyle -t ':omz:environment:grep' color; then
|
||||
export GREP_COLOR='37;45'
|
||||
export GREP_OPTIONS='--color=auto'
|
||||
fi
|
||||
|
||||
#
|
||||
# Termcap
|
||||
#
|
||||
|
||||
if zstyle -t ':omz:environment:termcap' color; then
|
||||
export LESS_TERMCAP_mb=$'\E[01;31m' # Begins blinking.
|
||||
export LESS_TERMCAP_md=$'\E[01;31m' # Begins bold.
|
||||
|
|
|
@ -8,6 +8,10 @@
|
|||
|
||||
source "${0:h}/external/zsh-history-substring-search.zsh"
|
||||
|
||||
#
|
||||
# Styles
|
||||
#
|
||||
|
||||
if zstyle -t ':omz:module:history-substring-search' case-sensitive; then
|
||||
unset HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS
|
||||
fi
|
||||
|
@ -16,6 +20,10 @@ if ! zstyle -t ':omz:module:history-substring-search' color; then
|
|||
unset HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_{FOUND,NOT_FOUND}
|
||||
fi
|
||||
|
||||
#
|
||||
# Key Bindings
|
||||
#
|
||||
|
||||
bindkey -M emacs "$key_info[Control]P" history-substring-search-up
|
||||
bindkey -M emacs "$key_info[Control]N" history-substring-search-down
|
||||
bindkey -M vicmd "k" history-substring-search-up
|
||||
|
|
|
@ -6,10 +6,18 @@
|
|||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
#
|
||||
# Variables
|
||||
#
|
||||
|
||||
HISTFILE="$HOME/.zhistory" # The path to the history file.
|
||||
HISTSIZE=10000 # The maximum number of events to save in the internal history.
|
||||
SAVEHIST=10000 # The maximum number of events to save in the history file.
|
||||
|
||||
#
|
||||
# Options
|
||||
#
|
||||
|
||||
setopt BANG_HIST # Treat the '!' character specially during expansion.
|
||||
setopt EXTENDED_HISTORY # Write the history file in the ':start:elapsed;command' format.
|
||||
setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits.
|
||||
|
@ -23,7 +31,9 @@ setopt HIST_SAVE_NO_DUPS # Do not write a duplicate event to the history
|
|||
setopt HIST_VERIFY # Do not execute immediately upon history expansion.
|
||||
setopt HIST_BEEP # Beep when accessing non-existent history.
|
||||
|
||||
#
|
||||
# Aliases
|
||||
#
|
||||
|
||||
# Lists the ten most used commands.
|
||||
alias history-stat="history . | awk '{print \$2}' | sort | uniq -c | sort -n -r | head"
|
||||
|
|
|
@ -11,7 +11,9 @@ if [[ "$OSTYPE" != darwin* ]]; then
|
|||
return 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Paths
|
||||
#
|
||||
|
||||
# Set the list of directories that info searches for manuals.
|
||||
infopath=(
|
||||
|
@ -31,7 +33,10 @@ path=(
|
|||
$path
|
||||
)
|
||||
|
||||
#
|
||||
# Aliases
|
||||
#
|
||||
|
||||
alias portc='sudo port clean --all installed'
|
||||
alias porti='sudo port install'
|
||||
alias ports='port search'
|
||||
|
|
|
@ -10,12 +10,20 @@ if [[ "$OSTYPE" != darwin* ]]; then
|
|||
return 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Aliases
|
||||
#
|
||||
|
||||
# Change directory to the current Finder directory.
|
||||
alias cdf='cd "$(pfd)"'
|
||||
|
||||
# Push directory to the current Finder directory.
|
||||
alias pushdf='pushd "$(pfd)"'
|
||||
|
||||
#
|
||||
# Functions
|
||||
#
|
||||
|
||||
# Open files in Quick Look.
|
||||
function ql {
|
||||
(( $# > 0 )) && qlmanage -p "$@" &> /dev/null
|
||||
|
|
|
@ -14,6 +14,10 @@ if (( ! $+commands[pacman] )); then
|
|||
return 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Frontend
|
||||
#
|
||||
|
||||
# Get the Pacman frontend.
|
||||
zstyle -s ':omz:module:pacman' frontend '_pacman_frontend'
|
||||
|
||||
|
@ -25,7 +29,9 @@ if (( $+commands[$_pacman_frontend] )); then
|
|||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Aliases
|
||||
#
|
||||
|
||||
# Installs packages from repositories.
|
||||
alias paci='sudo pacman --sync'
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
#
|
||||
# Aliases
|
||||
#
|
||||
|
||||
# Disable color.
|
||||
if ! zstyle -t ':omz:module:pacman:yaourt' color; then
|
||||
alias pacman='pacman --nocolor'
|
||||
|
|
|
@ -10,6 +10,10 @@ if (( ! $+commands[perl] )); then
|
|||
return 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Local Module Installation
|
||||
#
|
||||
|
||||
if [[ "$OSTYPE" == darwin* ]]; then
|
||||
# Perl is slow; cache its output.
|
||||
cache_file="${0:h}/cache.zsh"
|
||||
|
@ -35,7 +39,9 @@ if [[ "$OSTYPE" == darwin* ]]; then
|
|||
unset env_var
|
||||
fi
|
||||
|
||||
#
|
||||
# Aliases
|
||||
#
|
||||
|
||||
# General
|
||||
alias pd='perldoc'
|
||||
|
|
|
@ -12,7 +12,10 @@ if (( ! $+commands[rails] )); then
|
|||
return 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Aliases (Compatible with Rails 2)
|
||||
#
|
||||
|
||||
alias rc='_rails-command console'
|
||||
alias rdc='_rails-command dbconsole'
|
||||
alias rdm='rake db:migrate'
|
||||
|
@ -27,7 +30,10 @@ alias rs='_rails-command server'
|
|||
alias rsd='_rails-command server --debugger'
|
||||
alias rx='_rails-command destroy'
|
||||
|
||||
#
|
||||
# Functions
|
||||
#
|
||||
|
||||
function _rails-command {
|
||||
if [[ -e "script/server" ]]; then
|
||||
ruby script/"$@"
|
||||
|
|
|
@ -10,7 +10,10 @@ if (( ! $+commands[rsync] )); then
|
|||
return 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Aliases
|
||||
#
|
||||
|
||||
_rsync_cmd='rsync --verbose --progress --human-readable --compress --archive --hard-links --one-file-system'
|
||||
|
||||
# Mac OS X and HFS+ Enhancements
|
||||
|
|
|
@ -36,7 +36,9 @@ else
|
|||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Aliases
|
||||
#
|
||||
|
||||
# Bundler
|
||||
if (( $+commands[bundle] )); then
|
||||
|
|
|
@ -10,7 +10,10 @@ if (( ! $+commands[screen] )); then
|
|||
return 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Auto Start
|
||||
#
|
||||
|
||||
if [[ -z "$STY" ]] && zstyle -t ':omz:module:screen' auto-start; then
|
||||
session="$(
|
||||
screen -list 2> /dev/null \
|
||||
|
@ -25,7 +28,11 @@ if [[ -z "$STY" ]] && zstyle -t ':omz:module:screen' auto-start; then
|
|||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Aliases
|
||||
#
|
||||
|
||||
alias sl="screen -list"
|
||||
alias sn="screen -U -S"
|
||||
alias sr="screen -a -A -U -D -R"
|
||||
|
||||
|
|
|
@ -11,7 +11,10 @@ if (( ! $+commands[tmux] )); then
|
|||
return 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Auto Start
|
||||
#
|
||||
|
||||
if [[ -z "$TMUX" ]] && zstyle -t ':omz:module:tmux' auto-start; then
|
||||
tmux_session='#OMZ'
|
||||
|
||||
|
@ -33,6 +36,9 @@ if [[ -z "$TMUX" ]] && zstyle -t ':omz:module:tmux' auto-start; then
|
|||
exec tmux new-session -t "$tmux_session"
|
||||
fi
|
||||
|
||||
#
|
||||
# Aliases
|
||||
#
|
||||
|
||||
alias ta="tmux attach-session"
|
||||
alias tl="tmux list-sessions"
|
||||
|
|
|
@ -13,7 +13,9 @@ omodload 'spectrum'
|
|||
# Correct commands.
|
||||
setopt CORRECT
|
||||
|
||||
#
|
||||
# Aliases
|
||||
#
|
||||
|
||||
# Disable correction.
|
||||
alias ack='nocorrect ack'
|
||||
|
@ -128,7 +130,9 @@ fi
|
|||
# Serves a directory via HTTP.
|
||||
alias http-serve='python -m SimpleHTTPServer'
|
||||
|
||||
#
|
||||
# Functions
|
||||
#
|
||||
|
||||
# Makes a directory and changes to it.
|
||||
function mkdcd {
|
||||
|
|
|
@ -11,7 +11,10 @@ if (( ! $+commands[yum] )); then
|
|||
return 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Aliases
|
||||
#
|
||||
|
||||
alias yumc='sudo yum clean all' # Cleans the cache.
|
||||
alias yumh='yum history' # Displays history.
|
||||
alias yumi='sudo yum install' # Installs package(s).
|
||||
|
@ -23,4 +26,3 @@ alias yums='yum search' # Searches for a package.
|
|||
alias yumu='sudo yum update' # Updates packages.
|
||||
alias yumU='sudo yum upgrade' # Upgrades packages.
|
||||
|
||||
|
||||
|
|
|
@ -8,7 +8,10 @@
|
|||
# Set the path to Oh My Zsh.
|
||||
export OMZ="$HOME/.oh-my-zsh"
|
||||
|
||||
#
|
||||
# Paths
|
||||
#
|
||||
|
||||
typeset -gU cdpath fpath mailpath manpath path
|
||||
typeset -gUT INFOPATH infopath
|
||||
|
||||
|
@ -49,22 +52,33 @@ for path_file in /etc/paths.d/*(.N); do
|
|||
done
|
||||
unset path_file
|
||||
|
||||
#
|
||||
# Language
|
||||
#
|
||||
|
||||
if [[ -z "$LANG" ]]; then
|
||||
eval "$(locale)"
|
||||
fi
|
||||
|
||||
#
|
||||
# Editors
|
||||
#
|
||||
|
||||
export EDITOR='nano'
|
||||
export VISUAL='nano'
|
||||
export PAGER='less'
|
||||
|
||||
# Browser (Default)
|
||||
#
|
||||
# Browser
|
||||
#
|
||||
|
||||
if [[ "$OSTYPE" == darwin* ]]; then
|
||||
export BROWSER='open'
|
||||
fi
|
||||
|
||||
#
|
||||
# Less
|
||||
#
|
||||
|
||||
# Set the default Less options.
|
||||
# Mouse-wheel scrolling has been disabled by -X (disable screen clearing).
|
||||
|
|
Loading…
Reference in a new issue