From b96bbca51c2e5de8862b7f7780c405b3f275de3d Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Tue, 31 Jan 2012 23:37:51 -0500 Subject: [PATCH] Added or edited file headers. --- alias.zsh | 7 ++++++ completion.zsh | 8 +++++++ directory.zsh | 8 +++++++ environment.zsh | 7 ++++++ functions/duh | 9 ++++++- functions/reload | 7 ++++++ helper.zsh | 7 ++++++ history.zsh | 8 +++++++ init.zsh | 6 +++++ keyboard.zsh | 7 ++++++ plugins/archive/completions/_extract | 7 ++++++ plugins/archive/completions/_ls-archive | 7 ++++++ plugins/archive/functions/extract | 7 ++++++ plugins/archive/functions/ls-archive | 7 ++++++ plugins/bundler/init.zsh | 8 +++++++ plugins/command-not-found/init.zsh | 9 ++++--- plugins/compleat/init.zsh | 12 +++++----- plugins/dpkg/functions/apt-copy | 9 ++++++- plugins/dpkg/functions/dbb-build | 9 ++++++- plugins/dpkg/init.zsh | 9 +++++++ plugins/git/alias.zsh | 7 ++++++ plugins/git/completion.zsh | 8 ++++++- plugins/git/completions/_git-hub | 7 ++++++ plugins/git/completions/_git-info | 7 ++++++ plugins/git/functions/git-branch | 8 ++++++- plugins/git/functions/git-hub | 8 ++++++- plugins/git/functions/git-info | 7 ++++++ plugins/git/functions/git-root | 8 ++++++- plugins/git/hub.zsh | 10 ++++++-- plugins/git/init.zsh | 12 +++++----- plugins/git/style.zsh | 7 +++++- plugins/gnu-utils/init.zsh | 13 +++++----- plugins/gpg-agent/init.zsh | 8 ++++++- plugins/history-substring-search/init.zsh | 8 ++++++- plugins/macports/init.zsh | 7 ++++++ plugins/node/functions/node-docs | 8 ++++++- plugins/node/init.zsh | 8 ++++++- plugins/osx/functions/manb | 8 ++++++- plugins/osx/functions/manp | 8 ++++++- plugins/osx/functions/pfd | 7 ++++++ plugins/osx/functions/pfs | 7 ++++++ plugins/osx/functions/tab | 7 ++++++ plugins/osx/functions/trash | 7 ++++++ plugins/osx/init.zsh | 7 +++++- plugins/pacman/functions/pacdisowned | 9 ++++++- plugins/pacman/functions/paclist | 9 ++++++- plugins/pacman/init.zsh | 10 ++++++-- plugins/perl/completions/_prep | 7 ++++++ plugins/perl/completions/_psub | 7 ++++++ plugins/perl/functions/prep | 7 +++++- plugins/perl/functions/psub | 7 +++++- plugins/perl/init.zsh | 7 ++++++ plugins/python/init.zsh | 7 ++++++ plugins/rails/init.zsh | 9 +++++++ plugins/rsync/init.zsh | 7 ++++++ plugins/ruby/init.zsh | 7 ++++++ plugins/screen/init.zsh | 12 +++++----- plugins/ssh-agent/init.zsh | 29 +++++++++++------------ plugins/tmux/init.zsh | 12 +++++----- plugins/wakeonlan/completions/_wake | 8 +++++++ plugins/wakeonlan/functions/wake | 8 +++++++ plugins/yum/init.zsh | 8 +++++++ plugins/z/init.zsh | 16 +++++-------- spectrum.zsh | 10 +++++--- templates/zshrc.zsh | 7 ++++++ terminal.zsh | 8 +++++++ themes/minimal/prompt_minimal_setup | 8 +++++++ themes/nicoulaj/prompt_nicoulaj_setup | 26 ++++++++++++-------- themes/sorin/prompt_sorin_setup | 17 +++++++------ themes/steeef/prompt_steeef_setup | 14 ++++++----- utility.zsh | 9 +++++++ 71 files changed, 527 insertions(+), 108 deletions(-) diff --git a/alias.zsh b/alias.zsh index 302dac4..3ebf030 100644 --- a/alias.zsh +++ b/alias.zsh @@ -1,3 +1,10 @@ +# +# Defines general aliases. +# +# Authors: +# Sorin Ionescu +# + setopt CORRECT # Correct commands. # The 'ls' Family diff --git a/completion.zsh b/completion.zsh index 374f6fc..02d2561 100644 --- a/completion.zsh +++ b/completion.zsh @@ -1,3 +1,11 @@ +# +# Sets completion options. +# +# Authors: +# Robby Russell +# Sorin Ionescu +# + # Dumb terminals lack support. if [[ "$TERM" == 'dumb' ]]; then return diff --git a/directory.zsh b/directory.zsh index c082c46..322dee0 100644 --- a/directory.zsh +++ b/directory.zsh @@ -1,3 +1,11 @@ +# +# Sets directory options and defines directory aliases. +# +# Authors: +# James Cox +# Sorin Ionescu +# + setopt AUTO_CD # Auto cd to a directory without typing cd. setopt AUTO_PUSHD # Push the old directory onto the stack on cd. setopt PUSHD_IGNORE_DUPS # Don't store duplicates in the stack. diff --git a/environment.zsh b/environment.zsh index 510a7d4..9c170cd 100644 --- a/environment.zsh +++ b/environment.zsh @@ -1,3 +1,10 @@ +# +# Sets general shell options and defines environment variables. +# +# Authors: +# Sorin Ionescu +# + # Smart URLs autoload -Uz url-quote-magic zle -N self-insert url-quote-magic diff --git a/functions/duh b/functions/duh index b01f142..10439f1 100644 --- a/functions/duh +++ b/functions/duh @@ -1,4 +1,11 @@ -# Displays human readable disk usage statistics. +# +# Displays human readable disk usage. +# +# Authors: +# Suraj N. Kurapati +# Sorin Ionescu +# + function duh() { (( $# == 0 )) && set -- * if [[ "$OSTYPE" == linux* ]]; then diff --git a/functions/reload b/functions/reload index 9b75639..bf84916 100644 --- a/functions/reload +++ b/functions/reload @@ -1,3 +1,10 @@ +# +# Reloads the Zsh configuration. +# +# Authors: +# Sorin Ionescu +# + # Reloads ~/.zshrc. local zshrc="$HOME/.zshrc" if [[ -n "$1" ]]; then diff --git a/helper.zsh b/helper.zsh index 0ad29ce..dd101a5 100644 --- a/helper.zsh +++ b/helper.zsh @@ -1,3 +1,10 @@ +# +# Defines helper functions. +# +# Authors: +# Sorin Ionescu +# + # Checks if a file can be autoloaded by trying to load it in a subshell. function autoloadable() { ( unfunction $1 ; autoload -U +X $1 ) &> /dev/null diff --git a/history.zsh b/history.zsh index 3f9fa0f..5b5b9b3 100644 --- a/history.zsh +++ b/history.zsh @@ -1,3 +1,11 @@ +# +# Sets history options. +# +# Authors: +# Robby Russell +# Sorin Ionescu +# + HISTFILE="$HOME/.zhistory" HISTSIZE=10000 SAVEHIST=10000 diff --git a/init.zsh b/init.zsh index 53f51eb..ec218dd 100644 --- a/init.zsh +++ b/init.zsh @@ -1,4 +1,10 @@ +# # Initializes Oh My Zsh. +# +# Authors: +# Robby Russell +# Sorin Ionescu +# # Check for the minimum supported version. min_zsh_version='4.3.10' diff --git a/keyboard.zsh b/keyboard.zsh index d783319..6dcf100 100644 --- a/keyboard.zsh +++ b/keyboard.zsh @@ -1,3 +1,10 @@ +# +# Sets keyboard bindings. +# +# Authors: +# Sorin Ionescu +# + # Dumb terminals lack support. if [[ "$TERM" == 'dumb' ]]; then return diff --git a/plugins/archive/completions/_extract b/plugins/archive/completions/_extract index 3e28cfd..901a848 100644 --- a/plugins/archive/completions/_extract +++ b/plugins/archive/completions/_extract @@ -1,6 +1,13 @@ #compdef extract #autoload +# +# Completes extract. +# +# Authors: +# Sorin Ionescu +# + _arguments \ '(-r --remove)'{-r,--remove}'[remove archive]' \ "*::archive file:_files -g '(#i)*.(tar|tgz|tbz|tbz2|txz|tlz|gz|bz2|xz|lzma|Z|zip|rar|7z|deb)(-.)'" && return 0 diff --git a/plugins/archive/completions/_ls-archive b/plugins/archive/completions/_ls-archive index 1931649..00453c4 100644 --- a/plugins/archive/completions/_ls-archive +++ b/plugins/archive/completions/_ls-archive @@ -1,6 +1,13 @@ #compdef ls-archive #autoload +# +# Completes ls-archive. +# +# Authors: +# Sorin Ionescu +# + _arguments \ '(-v --verbose)'{-v,--remove}'[verbose archive listing]' \ "*::archive file:_files -g '(#i)*.(tar|tgz|tbz|tbz2|txz|tlz|gz|bz2|xz|lzma|Z|zip|rar|7z)(-.)'" && return 0 diff --git a/plugins/archive/functions/extract b/plugins/archive/functions/extract index bc34101..a18f506 100644 --- a/plugins/archive/functions/extract +++ b/plugins/archive/functions/extract @@ -1,3 +1,10 @@ +# +# Extracts the contents of popular archive formats. +# +# Authors: +# Sorin Ionescu +# + local remove_archive local success local file_name diff --git a/plugins/archive/functions/ls-archive b/plugins/archive/functions/ls-archive index 0c31b95..fb7a503 100644 --- a/plugins/archive/functions/ls-archive +++ b/plugins/archive/functions/ls-archive @@ -1,3 +1,10 @@ +# +# Lists the contents of popular archive formats. +# +# Authors: +# Sorin Ionescu +# + local verbose if (( $# == 0 )); then diff --git a/plugins/bundler/init.zsh b/plugins/bundler/init.zsh index c3377d4..9fdb153 100644 --- a/plugins/bundler/init.zsh +++ b/plugins/bundler/init.zsh @@ -1,3 +1,11 @@ +# +# Defines bundler aliases. +# +# Authors: +# Myron Marston +# Sorin Ionescu +# + # Aliases alias b='bundle' alias be='b exec' diff --git a/plugins/command-not-found/init.zsh b/plugins/command-not-found/init.zsh index e94b8f2..ac9468b 100644 --- a/plugins/command-not-found/init.zsh +++ b/plugins/command-not-found/init.zsh @@ -1,6 +1,9 @@ -# Uses the command-not-found package Zsh support as seen in -# http://www.porcheron.info/command-not-found-for-zsh/ and -# installed in Ubuntu. +# +# Displays installation information for not found commands. +# +# Authors: +# Joseph Jon Booker +# if [[ -f /etc/zsh_command_not_found ]]; then source /etc/zsh_command_not_found diff --git a/plugins/compleat/init.zsh b/plugins/compleat/init.zsh index 1010733..a9c684f 100644 --- a/plugins/compleat/init.zsh +++ b/plugins/compleat/init.zsh @@ -1,9 +1,9 @@ -# ------------------------------------------------------------------------------ -# FILE: compleat.plugin.zsh -# DESCRIPTION: oh-my-zsh plugin file. -# AUTHOR: Sorin Ionescu -# VERSION: 1.0.2 -# ------------------------------------------------------------------------------ +# +# Loads Compleat completions. +# +# Authors: +# Sorin Ionescu +# if (( ${+commands[compleat]} )); then compleat_setup="${commands[compleat]:h:h}/share/compleat-1.0/compleat_setup" diff --git a/plugins/dpkg/functions/apt-copy b/plugins/dpkg/functions/apt-copy index 2f2e283..c77b0ce 100644 --- a/plugins/dpkg/functions/apt-copy +++ b/plugins/dpkg/functions/apt-copy @@ -1,4 +1,11 @@ -# Create a simple script that can be used to 'duplicate' a system. +# +# Generates a script that can be used to duplicate a dpkg-based system. +# +# Authors: +# Daniel Bolton +# Sorin Ionescu +# + print '#!/bin/sh'"\n" > apt-copy.sh list=$(perl -m'AptPkg::Cache' -e '$c=AptPkg::Cache->new; for (keys %$c){ push @a, $_ if $c->{$_}->{'CurrentState'} eq 'Installed';} print "$_ " for sort @a;') diff --git a/plugins/dpkg/functions/dbb-build b/plugins/dpkg/functions/dbb-build index 7576e2e..4fa5567 100644 --- a/plugins/dpkg/functions/dbb-build +++ b/plugins/dpkg/functions/dbb-build @@ -1,4 +1,11 @@ -# Kernel-package building shortcut. +# +# Makes a dpkg Linux kernel package. +# +# Authors: +# Daniel Bolton +# Sorin Ionescu +# + MAKEFLAGS='' # Temporarily unset MAKEFLAGS ( '-j3' will fail ). appendage='-custom' # This shows up in $ (uname -r ). revision=$(date +"%Y%m%d") # This shows up in the .deb file name. diff --git a/plugins/dpkg/init.zsh b/plugins/dpkg/init.zsh index a653768..44c879d 100644 --- a/plugins/dpkg/init.zsh +++ b/plugins/dpkg/init.zsh @@ -1,3 +1,12 @@ +# +# Defines dpkg aliases. +# +# Authors: +# Daniel Bolton +# Benjamin Boudreau +# Sorin Ionescu +# + # Aliases alias as="aptitude -F \"* %p -> %d \n(%v/%V)\" --no-gui --disable-columns search" # Search package. alias ad="sudo apt-get update" # Update packages lists. diff --git a/plugins/git/alias.zsh b/plugins/git/alias.zsh index 02c117d..d78778e 100644 --- a/plugins/git/alias.zsh +++ b/plugins/git/alias.zsh @@ -1,3 +1,10 @@ +# +# Defines Git aliases. +# +# Authors: +# Sorin Ionescu +# + # Git alias g='git' compdef g=git diff --git a/plugins/git/completion.zsh b/plugins/git/completion.zsh index b986745..8c4a568 100644 --- a/plugins/git/completion.zsh +++ b/plugins/git/completion.zsh @@ -1,4 +1,10 @@ -# Get the latest Git completion. +# +# Gets the latest Git completion. +# +# Authors: +# Sorin Ionescu +# + completion_file="${0:h}/completions/_git" completion_file_url='http://zsh.git.sourceforge.net/git/gitweb.cgi?p=zsh/zsh;a=blob_plain;f=Completion/Unix/Command/_git;hb=HEAD' if [[ ! -e "$completion_file" ]] && (( $+commands[git] )); then diff --git a/plugins/git/completions/_git-hub b/plugins/git/completions/_git-hub index e4e2945..86a1f33 100644 --- a/plugins/git/completions/_git-hub +++ b/plugins/git/completions/_git-hub @@ -1,6 +1,13 @@ #compdef git-hub #autoload +# +# Completes git-hub. +# +# Authors: +# Sorin Ionescu +# + local state remotes remote branches ret=1 _arguments -C -s -S \ diff --git a/plugins/git/completions/_git-info b/plugins/git/completions/_git-info index 1708fae..0357c6d 100644 --- a/plugins/git/completions/_git-info +++ b/plugins/git/completions/_git-info @@ -1,6 +1,13 @@ #compdef git-info #autoload +# +# Completes git-info. +# +# Authors: +# Sorin Ionescu +# + _arguments "1:toggle:(( on\:'enable in-prompt information for the current repository' off\:'disable in-prompt information for the current repository' diff --git a/plugins/git/functions/git-branch b/plugins/git/functions/git-branch index b38618a..3078ad1 100644 --- a/plugins/git/functions/git-branch +++ b/plugins/git/functions/git-branch @@ -1,4 +1,10 @@ -# Gets the current branch. +# +# Displays the current Git branch. +# +# Authors: +# Sorin Ionescu +# + local ref="$(git symbolic-ref HEAD 2> /dev/null)" if [[ -n "$ref" ]]; then print "${ref#refs/heads/}" diff --git a/plugins/git/functions/git-hub b/plugins/git/functions/git-hub index 7deeddf..d3758d4 100644 --- a/plugins/git/functions/git-hub +++ b/plugins/git/functions/git-hub @@ -1,4 +1,10 @@ -# Open the GitHub repository in the browser. +# +# Opens a GitHub repository in the default browser. +# +# Authors: +# Sorin Ionescu +# + local remote branches branch current_branch url remote="${1:-origin}" diff --git a/plugins/git/functions/git-info b/plugins/git/functions/git-info index c0854c4..a0e4e0e 100644 --- a/plugins/git/functions/git-info +++ b/plugins/git/functions/git-info @@ -1,3 +1,10 @@ +# +# Displays Git repository information. +# +# Authors: +# Sorin Ionescu +# + # Gets the Git special action (am, merge, rebase, etc.). # Borrowed from vcs_info and edited. function _git-action() { diff --git a/plugins/git/functions/git-root b/plugins/git/functions/git-root index e86ce70..d704eff 100644 --- a/plugins/git/functions/git-root +++ b/plugins/git/functions/git-root @@ -1,4 +1,10 @@ -# Gets the repository root. +# +# Displays the Git repository root. +# +# Authors: +# Sorin Ionescu +# + local root="$(git rev-parse --show-toplevel 2> /dev/null)" if [[ -n "$root" ]]; then print "$root" diff --git a/plugins/git/hub.zsh b/plugins/git/hub.zsh index 8586e0a..8ff4059 100644 --- a/plugins/git/hub.zsh +++ b/plugins/git/hub.zsh @@ -1,5 +1,11 @@ -# Hub by defunkt -# https://github.com/defunkt/hub +# +# Adds GitHub knowledge to the Git command. +# +# Authors: +# Chris Wanstrath +# Sorin Ionescu +# + if (( $+commands[hub] )); then function git() { hub "$@" diff --git a/plugins/git/init.zsh b/plugins/git/init.zsh index 1a30349..9e7b18c 100644 --- a/plugins/git/init.zsh +++ b/plugins/git/init.zsh @@ -1,9 +1,9 @@ -# ------------------------------------------------------------------------------ -# FILE: git.plugin.zsh -# DESCRIPTION: oh-my-zsh plugin file. -# AUTHOR: Sorin Ionescu -# VERSION: 1.0.0 -# ------------------------------------------------------------------------------ +# +# Provides Git aliases and functions. +# +# Authors: +# Sorin Ionescu +# # Source plugin files. source "${0:h}/alias.zsh" diff --git a/plugins/git/style.zsh b/plugins/git/style.zsh index 6eae19a..218e87a 100644 --- a/plugins/git/style.zsh +++ b/plugins/git/style.zsh @@ -1,4 +1,9 @@ -# The default styles. +# +# Defines Git information display styles. +# +# Authors: +# Sorin Ionescu +# # %s - Special action name (am, merge, rebase). zstyle ':omz:plugin:git:prompt' action 'action:%s' diff --git a/plugins/gnu-utils/init.zsh b/plugins/gnu-utils/init.zsh index 70ec007..cf58a8e 100644 --- a/plugins/gnu-utils/init.zsh +++ b/plugins/gnu-utils/init.zsh @@ -1,10 +1,9 @@ -# ------------------------------------------------------------------------------ -# FILE: gnu-utils.plugin.zsh -# DESCRIPTION: oh-my-zsh plugin file. -# AUTHOR: Sorin Ionescu -# VERSION: 1.0.2 -# ------------------------------------------------------------------------------ - +# +# Provides for the interactive usage of GNU Coreutils on BSD systems. +# +# Authors: +# Sorin Ionescu +# if (( $+commands[gdircolors] )); then function __gnu_utils() { diff --git a/plugins/gpg-agent/init.zsh b/plugins/gpg-agent/init.zsh index 518a58e..c387884 100644 --- a/plugins/gpg-agent/init.zsh +++ b/plugins/gpg-agent/init.zsh @@ -1,4 +1,10 @@ -# Based on ssh-agent code. +# +# Provides for an easier use of gpg-agent. +# +# Authors: +# Florian Walch +# Sorin Ionescu +# local GPG_ENV="$HOME/.gnupg/gpg-agent.env" diff --git a/plugins/history-substring-search/init.zsh b/plugins/history-substring-search/init.zsh index 4ff3802..8d3403f 100644 --- a/plugins/history-substring-search/init.zsh +++ b/plugins/history-substring-search/init.zsh @@ -1,4 +1,10 @@ -# This file integrates the history-substring-search script into oh-my-zsh. +# +# Integrates history-substring-search into Oh My Zsh. +# +# Authors: +# Suraj N. Kurapati +# Sorin Ionescu +# source "${0:h}/history-substring-search.zsh" diff --git a/plugins/macports/init.zsh b/plugins/macports/init.zsh index 3136864..c07ad2d 100644 --- a/plugins/macports/init.zsh +++ b/plugins/macports/init.zsh @@ -1,3 +1,10 @@ +# +# Defines MacPorts aliases. +# +# Authors: +# Matt Cable +# + # Aliases alias pc="sudo port clean --all installed" alias pi="sudo port install $1" diff --git a/plugins/node/functions/node-docs b/plugins/node/functions/node-docs index cbf4bac..155b131 100644 --- a/plugins/node/functions/node-docs +++ b/plugins/node/functions/node-docs @@ -1,4 +1,10 @@ -# Open the node api for your current version to the optional section. +# +# Opens the Node.js online API documentation in the default browser. +# +# Authors: +# Sorin Ionescu +# + # TODO: Make the sections easier to use. open "http://nodejs.org/docs/$(node --version | sed 's/-.*//')/api/all.html#${1}" diff --git a/plugins/node/init.zsh b/plugins/node/init.zsh index 69333e3..0e16588 100644 --- a/plugins/node/init.zsh +++ b/plugins/node/init.zsh @@ -1,4 +1,10 @@ -# Complete npm. +# +# Completes npm. +# +# Authors: +# Sorin Ionescu +# + cache_file="${0:h}/cache.zsh" if [[ ! -f "$cache_file" ]] && (( $+commands[npm] )); then # npm is slow; cache its output. diff --git a/plugins/osx/functions/manb b/plugins/osx/functions/manb index 5dfb4c5..f837739 100644 --- a/plugins/osx/functions/manb +++ b/plugins/osx/functions/manb @@ -1,4 +1,10 @@ -# Open man pages in Bwana. +# +# Opens man pages in Bwana.app. +# +# Authors: +# Sorin Ionescu +# + function manb() { local page if (( $# > 0 )); then diff --git a/plugins/osx/functions/manp b/plugins/osx/functions/manp index 35c1d95..87da47a 100644 --- a/plugins/osx/functions/manp +++ b/plugins/osx/functions/manp @@ -1,4 +1,10 @@ -# Open man pages in Preview. +# +# Opens man pages in Preview.app. +# +# Authors: +# Sorin Ionescu +# + function manp() { local page if (( $# > 0 )); then diff --git a/plugins/osx/functions/pfd b/plugins/osx/functions/pfd index 5df7d27..3e038a6 100644 --- a/plugins/osx/functions/pfd +++ b/plugins/osx/functions/pfd @@ -1,3 +1,10 @@ +# +# Displays the current Finder.app directory. +# +# Authors: +# Sorin Ionescu +# + osascript 2>/dev/null < +# + osascript 2>/dev/null < +# + local command="cd \\\"$PWD\\\"" (( $# > 0 )) && command="${command}; $*" diff --git a/plugins/osx/functions/trash b/plugins/osx/functions/trash index 33c0f6d..d392437 100644 --- a/plugins/osx/functions/trash +++ b/plugins/osx/functions/trash @@ -1,3 +1,10 @@ +# +# Moves directories and files to Trash. +# +# Authors: +# Sorin Ionescu +# + print -N "${@:a}" | xargs -0 osascript -e ' on run theFilePaths tell application "Finder" diff --git a/plugins/osx/init.zsh b/plugins/osx/init.zsh index da60837..83d5b17 100644 --- a/plugins/osx/init.zsh +++ b/plugins/osx/init.zsh @@ -1,4 +1,9 @@ -# Sorin Ionescu +# +# Defines Mac OS X aliases and functions. +# +# Authors: +# Sorin Ionescu +# # Change directory to the current Finder directory. alias cdf='cd "$(pfd)"' diff --git a/plugins/pacman/functions/pacdisowned b/plugins/pacman/functions/pacdisowned index d46c0ee..81edf0a 100644 --- a/plugins/pacman/functions/pacdisowned +++ b/plugins/pacman/functions/pacdisowned @@ -1,4 +1,11 @@ -# List disowned files. +# +# Lists pacman disowned files. +# +# Authors: +# Benjamin Boudreau +# Sorin Ionescu +# + tmp="${TMPDIR-/tmp}/pacman-disowned-$UID-$$" db="$tmp/db" fs="$tmp/fs" diff --git a/plugins/pacman/functions/paclist b/plugins/pacman/functions/paclist index 648fbbf..3f83dc8 100644 --- a/plugins/pacman/functions/paclist +++ b/plugins/pacman/functions/paclist @@ -1,4 +1,11 @@ -# List explicitly installed packages. +# +# Lists explicitly installed pacman packages. +# +# Authors: +# Benjamin Boudreau +# Sorin Ionescu +# + sudo pacman -Qei $(pacman -Qu|cut -d" " -f 1) \ | awk ' BEGIN {FS=":"}/^Name/{printf("\033[1;36m%s\033[1;37m", $2)}/^Description/{print $2}' diff --git a/plugins/pacman/init.zsh b/plugins/pacman/init.zsh index 8f22176..645139e 100644 --- a/plugins/pacman/init.zsh +++ b/plugins/pacman/init.zsh @@ -1,7 +1,13 @@ -# Arch Linux Zsh Aliases and Functions # -# Pacman Tips: +# Defines pacman aliases. +# +# Authors: +# Benjamin Boudreau +# Sorin Ionescu +# +# Tips: # https://wiki.archlinux.org/index.php/Pacman_Tips +# # Yaourt Aliases if (( $+commands[yaourt] )); then diff --git a/plugins/perl/completions/_prep b/plugins/perl/completions/_prep index 338e4b0..8ecc7fd 100644 --- a/plugins/perl/completions/_prep +++ b/plugins/perl/completions/_prep @@ -1,6 +1,13 @@ #compdef prep #autoload +# +# Completes prep. +# +# Authors: +# Sorin Ionescu +# + _arguments \ '-i[ignore case]' \ '-m[^ and $ match the start and the end of a line]' \ diff --git a/plugins/perl/completions/_psub b/plugins/perl/completions/_psub index 3fa7ef8..cd8bcfe 100644 --- a/plugins/perl/completions/_psub +++ b/plugins/perl/completions/_psub @@ -1,6 +1,13 @@ #compdef psub #autoload +# +# Completes psub. +# +# Authors: +# Sorin Ionescu +# + _arguments \ '-g[match globally]' \ '-i[ignore case]' \ diff --git a/plugins/perl/functions/prep b/plugins/perl/functions/prep index 2f5a60b..c61487b 100644 --- a/plugins/perl/functions/prep +++ b/plugins/perl/functions/prep @@ -1,4 +1,9 @@ -# Perl Grep +# +# Provides a grep-like pattern search. +# +# Authors: +# Sorin Ionescu +# local usage pattern modifiers invert diff --git a/plugins/perl/functions/psub b/plugins/perl/functions/psub index 40fd286..4f2c06e 100644 --- a/plugins/perl/functions/psub +++ b/plugins/perl/functions/psub @@ -1,4 +1,9 @@ -# Perl Substitution +# +# Provides a sed-like pattern substitution. +# +# Authors: +# Sorin Ionescu +# local usage pattern replacement modifiers diff --git a/plugins/perl/init.zsh b/plugins/perl/init.zsh index 7841181..b807bb6 100644 --- a/plugins/perl/init.zsh +++ b/plugins/perl/init.zsh @@ -1,3 +1,10 @@ +# +# Enables local Perl module installation on Mac OS X and defines aliases. +# +# Authors: +# Sorin Ionescu +# + # For Perl older than 5.10.14, install local::lib. # curl -L -C - -O http://search.cpan.org/CPAN/authors/id/A/AP/APEIRON/local-lib-1.008004.tar.gz # tar xvf local-lib-1.008004.tar.gz diff --git a/plugins/python/init.zsh b/plugins/python/init.zsh index 3bc947c..0c181fd 100644 --- a/plugins/python/init.zsh +++ b/plugins/python/init.zsh @@ -1,3 +1,10 @@ +# +# Enables local Python package installation. +# +# Authors: +# Sorin Ionescu +# + # Prepend PEP 370 per user site packages directory, which defaults to # ~/Library/Python on Mac OS X and ~/.local elsewhere, to PATH/MANPATH. if [[ "$OSTYPE" == darwin* ]]; then diff --git a/plugins/rails/init.zsh b/plugins/rails/init.zsh index 490cdea..53bbda6 100644 --- a/plugins/rails/init.zsh +++ b/plugins/rails/init.zsh @@ -1,3 +1,12 @@ +# +# Defines Ruby on Rails aliases. +# +# Authors: +# Robby Russell +# Jake Bell +# Sorin Ionescu +# + # Aliases (compatible with Rails 2) alias rc='_rails-command console' alias rd='_rails-command destroy' diff --git a/plugins/rsync/init.zsh b/plugins/rsync/init.zsh index 0ec3693..caf705a 100644 --- a/plugins/rsync/init.zsh +++ b/plugins/rsync/init.zsh @@ -1,3 +1,10 @@ +# +# Defines rsync aliases. +# +# Authors: +# Sorin Ionescu +# + # Aliases rsync_cmd='rsync --verbose --progress --human-readable --compress --archive --hard-links --one-file-system' diff --git a/plugins/ruby/init.zsh b/plugins/ruby/init.zsh index 936a38c..c1c877a 100644 --- a/plugins/ruby/init.zsh +++ b/plugins/ruby/init.zsh @@ -1,3 +1,10 @@ +# +# Configures Ruby gem installation and loads rvm/rbenv. +# +# Authors: +# Sorin Ionescu +# + # Install local gems according to Mac OS X conventions. if [[ "$OSTYPE" == darwin* ]]; then export GEM_HOME="$HOME/Library/Ruby/Gems/${$(ruby --version)[6,8]}" diff --git a/plugins/screen/init.zsh b/plugins/screen/init.zsh index e46283b..02f914e 100644 --- a/plugins/screen/init.zsh +++ b/plugins/screen/init.zsh @@ -1,9 +1,9 @@ -# ------------------------------------------------------------------------------ -# FILE: screen.plugin.zsh -# DESCRIPTION: oh-my-zsh plugin file. -# AUTHOR: Sorin Ionescu -# VERSION: 1.0.0 -# ------------------------------------------------------------------------------ +# +# Defines GNU Screen aliases and provides for auto launching it at startup. +# +# Authors: +# Sorin Ionescu +# # Aliases alias sl="screen -list" diff --git a/plugins/ssh-agent/init.zsh b/plugins/ssh-agent/init.zsh index 3f7a526..560d9bf 100644 --- a/plugins/ssh-agent/init.zsh +++ b/plugins/ssh-agent/init.zsh @@ -1,25 +1,24 @@ # -# INSTRUCTIONS +# Provides for an easier use of ssh-agent. # -# To enabled agent forwarding support, add the following to -# your .zshrc file: +# Authors: +# Robby Russell +# Theodore Robert Campbell Jr +# Joseph M. Reagle Jr. +# Florent Thoumie +# Jonas Pfenniger +# gwjo +# Sorin Ionescu # -# zstyle ':omz:plugin:ssh-agent' forwarding 'on' +# Usage: +# To enable agent forwarding, add the following to your .zshrc: # -# To load multiple identies, use the identities style, For -# example: +# zstyle ':omz:plugin:ssh-agent' forwarding 'yes' +# +# To load multiple identies, add the following to your .zshrc: # # zstyle ':omz:plugin:ssh-agent' identities 'id_rsa' 'id_rsa2' 'id_github' # -# -# CREDITS -# -# Based on code from Joseph M. Reagle -# http://www.cygwin.com/ml/cygwin/2001-06/msg00537.html -# -# Agent forwarding support based on ideas from -# Florent Thoumie and Jonas Pfenniger -# _ssh_agent_env="$HOME/.ssh/environment-$HOST" _ssh_agent_forwarding= diff --git a/plugins/tmux/init.zsh b/plugins/tmux/init.zsh index 8e21335..e04d25c 100644 --- a/plugins/tmux/init.zsh +++ b/plugins/tmux/init.zsh @@ -1,9 +1,9 @@ -# ------------------------------------------------------------------------------ -# FILE: tmux.plugin.zsh -# DESCRIPTION: oh-my-zsh plugin file. -# AUTHOR: Sorin Ionescu -# VERSION: 1.0.0 -# ------------------------------------------------------------------------------ +# +# Defines tmux aliases and provides for auto launching it at startup. +# +# Authors: +# Sorin Ionescu +# # Aliases alias ta="tmux attach-session" diff --git a/plugins/wakeonlan/completions/_wake b/plugins/wakeonlan/completions/_wake index fbf5e9e..85aee5a 100644 --- a/plugins/wakeonlan/completions/_wake +++ b/plugins/wakeonlan/completions/_wake @@ -1,5 +1,13 @@ #compdef wake #autoload +# +# Completes wake. +# +# Authors: +# Paul Gideon Dann +# Sorin Ionescu +# + _arguments "1:device to wake:_files -W '$HOME/.wakeonlan'" && return 0 diff --git a/plugins/wakeonlan/functions/wake b/plugins/wakeonlan/functions/wake index c4cba48..7e03efa 100644 --- a/plugins/wakeonlan/functions/wake +++ b/plugins/wakeonlan/functions/wake @@ -1,3 +1,11 @@ +# +# Wakes devices via wakeonlan. +# +# Authors: +# Paul Gideon Dann +# Sorin Ionescu +# + local config_file="$HOME/.wakeonlan/$1" if [[ ! -f "$config_file" ]]; then print "$0: no such device file: $1" >&2 diff --git a/plugins/yum/init.zsh b/plugins/yum/init.zsh index d0ee236..a71f67a 100644 --- a/plugins/yum/init.zsh +++ b/plugins/yum/init.zsh @@ -1,3 +1,11 @@ +# +# Defines yum aliases. +# +# Authors: +# Simon +# Sorin Ionescu +# + # Aliases alias ys="yum search" # Search package. alias yp="yum info" # Show package info. diff --git a/plugins/z/init.zsh b/plugins/z/init.zsh index bcdc738..e08e16a 100644 --- a/plugins/z/init.zsh +++ b/plugins/z/init.zsh @@ -1,13 +1,9 @@ -# ------------------------------------------------------------------------------ -# FILE: z.plugin.zsh -# DESCRIPTION: oh-my-zsh plugin file. -# AUTHOR: Sorin Ionescu -# VERSION: 1.0.0 -# ------------------------------------------------------------------------------ - - -# z is the new j. -# https://github.com/rupa/z +# +# Maintains a frequently used directory list for fast directory changes. +# +# Authors: +# Sorin Ionescu +# if [[ -f /etc/profile.d/z.zsh ]]; then source /etc/profile.d/z.zsh diff --git a/spectrum.zsh b/spectrum.zsh index 629e041..ed0a483 100644 --- a/spectrum.zsh +++ b/spectrum.zsh @@ -1,6 +1,10 @@ -# A script to make using 256 colors in Zsh less painful. -# P.C. Shyamshankar -# Sorin Ionescu +# +# Provides for easier formatting and use of 256 colors. +# +# Authors: +# P.C. Shyamshankar +# Sorin Ionescu +# typeset -Ag FX FG BG diff --git a/templates/zshrc.zsh b/templates/zshrc.zsh index c177862..deced37 100644 --- a/templates/zshrc.zsh +++ b/templates/zshrc.zsh @@ -1,3 +1,10 @@ +# +# Sets Oh My Zsh options. +# +# Authors: +# Sorin Ionescu +# + # Set the key mapping style to 'emacs' or 'vi'. zstyle ':omz:editor' keymap 'emacs' diff --git a/terminal.zsh b/terminal.zsh index 4408756..e709577 100644 --- a/terminal.zsh +++ b/terminal.zsh @@ -1,3 +1,11 @@ +# +# Sets terminal window and tab titles. +# +# Authors: +# James Cox +# Sorin Ionescu +# + # Dumb terminals lack support. if [[ "$TERM" == 'dumb' ]]; then return diff --git a/themes/minimal/prompt_minimal_setup b/themes/minimal/prompt_minimal_setup index 35b4343..fbd60f2 100644 --- a/themes/minimal/prompt_minimal_setup +++ b/themes/minimal/prompt_minimal_setup @@ -1,3 +1,11 @@ +# +# A monochrome theme that displays basic information. +# +# Authors: +# Brian Tse +# Sorin Ionescu +# + function +vi-git-status() { # Untracked files. if [[ -n $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then diff --git a/themes/nicoulaj/prompt_nicoulaj_setup b/themes/nicoulaj/prompt_nicoulaj_setup index 84061fd..2a6c5bd 100644 --- a/themes/nicoulaj/prompt_nicoulaj_setup +++ b/themes/nicoulaj/prompt_nicoulaj_setup @@ -1,14 +1,20 @@ -# ------------------------------------------------------------------------------ -# Prompt for Zsh: -# * One line. -# * VCS info on the right prompt. -# * Only shows the path on the left prompt by default. -# * Crops the path to a defined length and only shows the path relative to +# +# A simple theme that displays only relevant information. +# +# Authors: +# Julien Nicoulaud +# Sorin Ionescu +# +# Features: +# - One line. +# - VCS information in the right prompt. +# - Only shows the path on the left prompt by default. +# - Crops the path to a defined length and only shows the path relative to # the current VCS repository root. -# * Wears a different color wether the last command succeeded/failed. -# * Shows user@hostname if connected through SSH. -# * Shows if logged in as root or not. -# ------------------------------------------------------------------------------ +# - Uses a different color depending on if the last command succeeded/failed. +# - Shows user@hostname if connected through SSH. +# - Shows if logged in as root or not. +# function prompt_nicoulaj_setup() { setopt LOCAL_OPTIONS diff --git a/themes/sorin/prompt_sorin_setup b/themes/sorin/prompt_sorin_setup index f6944a8..a1aafbf 100644 --- a/themes/sorin/prompt_sorin_setup +++ b/themes/sorin/prompt_sorin_setup @@ -1,10 +1,13 @@ -# ------------------------------------------------------------------------------ -# FILE: prompt_sorin_setup -# DESCRIPTION: oh-my-zsh theme file. -# AUTHOR: Sorin Ionescu -# VERSION: 1.0.6 -# SCREENSHOT: http://i.imgur.com/aipDQ.png -# ------------------------------------------------------------------------------ +# +# A simple theme that only shows relevant information. +# +# Authors: +# Sorin Ionescu +# +# Screenshots: +# http://i.imgur.com/aipDQ.png +# + function prompt_sorin_precmd () { setopt LOCAL_OPTIONS unsetopt XTRACE KSH_ARRAYS diff --git a/themes/steeef/prompt_steeef_setup b/themes/steeef/prompt_steeef_setup index 6584125..0da78d7 100644 --- a/themes/steeef/prompt_steeef_setup +++ b/themes/steeef/prompt_steeef_setup @@ -1,11 +1,13 @@ -# Prompt style and colors based on Steve Losh's Prose theme: -# http://github.com/sjl/oh-my-zsh/blob/master/themes/prose.zsh-theme # -# vcs_info modifications from Bart Trojanowski's Zsh prompt: -# http://www.jukie.net/bart/blog/pimping-out-zsh-prompt +# A theme based on Steve Losh's prompt with VCS_INFO integration. +# +# Authors: +# Steve Losh +# Bart Trojanowski +# Brian Carper +# steeef +# Sorin Ionescu # -# Git untracked files modification from Brian Carper: -# http://briancarper.net/blog/570/git-info-in-your-zsh-prompt function virtualenv_info() { if [[ -n "$VIRTUAL_ENV" ]]; then diff --git a/utility.zsh b/utility.zsh index 20178cc..50a7654 100644 --- a/utility.zsh +++ b/utility.zsh @@ -1,3 +1,12 @@ +# +# Defines utility functions. +# +# Authors: +# Robby Russell +# Suraj N. Kurapati +# Sorin Ionescu +# + # Lists the ten most used commands. alias history-stat="history | awk '{print \$2}' | sort | uniq -c | sort -n -r | head"