diff --git a/alias.zsh b/alias.zsh index 302dac4e..3ebf0304 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 374f6fc9..02d25610 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 c082c469..322dee07 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 510a7d43..9c170cd2 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 b01f1421..10439f1b 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 9b756391..bf84916d 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 0ad29ce3..dd101a5e 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 3f9fa0f3..5b5b9b36 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 53f51eb0..ec218ddc 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 d7833195..6dcf1002 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 3e28cfd7..901a8489 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 1931649d..00453c4f 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 bc341017..a18f5068 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 0c31b95e..fb7a503d 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 c3377d43..9fdb1535 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 e94b8f28..ac9468bd 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 10107334..a9c684fe 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 2f2e2839..c77b0ceb 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 7576e2ea..4fa5567c 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 a653768d..44c879da 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 02c117d8..d78778e8 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 b9867452..8c4a5687 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 e4e2945d..86a1f336 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 1708fae4..0357c6d8 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 b38618a3..3078ad13 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 7deeddfc..d3758d47 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 c0854c4a..a0e4e0e0 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 e86ce70d..d704eff1 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 8586e0a5..8ff40594 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 1a303493..9e7b18c0 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 6eae19ab..218e87aa 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 70ec0071..cf58a8e8 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 518a58ec..c3878841 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 4ff38025..8d3403f2 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 31368646..c07ad2d6 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 cbf4bac6..155b131b 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 69333e3a..0e165883 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 5dfb4c5d..f8377393 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 35c1d95b..87da47ab 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 5df7d274..3e038a68 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 33c0f6d5..d3924373 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 da60837f..83d5b17c 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 d46c0ee1..81edf0ac 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 648fbbf8..3f83dc8b 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 8f221768..645139ed 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 338e4b05..8ecc7fd7 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 3fa7ef8a..cd8bcfe7 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 2f5a60b3..c61487bb 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 40fd286c..4f2c06e3 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 78411813..b807bb69 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 3bc947c4..0c181fdb 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 490cdeae..53bbda69 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 0ec36930..caf705a9 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 936a38c3..c1c877aa 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 e46283b8..02f914e3 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 3f7a5266..560d9bf7 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 8e213358..e04d25cb 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 fbf5e9ea..85aee5a1 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 c4cba48b..7e03efaa 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 d0ee236b..a71f67a5 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 bcdc7387..e08e16a3 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 629e0414..ed0a4835 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 c177862f..deced37f 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 44087564..e7095770 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 35b4343c..fbd60f2f 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 84061fd1..2a6c5bd7 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 f6944a85..a1aafbfe 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 6584125f..0da78d74 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 20178cc2..50a7654c 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"