1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-12-22 19:48:00 +00:00

Added or edited file headers.

This commit is contained in:
Sorin Ionescu 2012-01-31 23:37:51 -05:00
parent e1a71a84b1
commit b96bbca51c
71 changed files with 527 additions and 108 deletions

View File

@ -1,3 +1,10 @@
#
# Defines general aliases.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
setopt CORRECT # Correct commands. setopt CORRECT # Correct commands.
# The 'ls' Family # The 'ls' Family

View File

@ -1,3 +1,11 @@
#
# Sets completion options.
#
# Authors:
# Robby Russell <robby@planetargon.com>
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Dumb terminals lack support. # Dumb terminals lack support.
if [[ "$TERM" == 'dumb' ]]; then if [[ "$TERM" == 'dumb' ]]; then
return return

View File

@ -1,3 +1,11 @@
#
# Sets directory options and defines directory aliases.
#
# Authors:
# James Cox <james@imaj.es>
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
setopt AUTO_CD # Auto cd to a directory without typing cd. setopt AUTO_CD # Auto cd to a directory without typing cd.
setopt AUTO_PUSHD # Push the old directory onto the stack on cd. setopt AUTO_PUSHD # Push the old directory onto the stack on cd.
setopt PUSHD_IGNORE_DUPS # Don't store duplicates in the stack. setopt PUSHD_IGNORE_DUPS # Don't store duplicates in the stack.

View File

@ -1,3 +1,10 @@
#
# Sets general shell options and defines environment variables.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Smart URLs # Smart URLs
autoload -Uz url-quote-magic autoload -Uz url-quote-magic
zle -N self-insert url-quote-magic zle -N self-insert url-quote-magic

View File

@ -1,4 +1,11 @@
# Displays human readable disk usage statistics. #
# Displays human readable disk usage.
#
# Authors:
# Suraj N. Kurapati <sunaku@gmail.com>
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
function duh() { function duh() {
(( $# == 0 )) && set -- * (( $# == 0 )) && set -- *
if [[ "$OSTYPE" == linux* ]]; then if [[ "$OSTYPE" == linux* ]]; then

View File

@ -1,3 +1,10 @@
#
# Reloads the Zsh configuration.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Reloads ~/.zshrc. # Reloads ~/.zshrc.
local zshrc="$HOME/.zshrc" local zshrc="$HOME/.zshrc"
if [[ -n "$1" ]]; then if [[ -n "$1" ]]; then

View File

@ -1,3 +1,10 @@
#
# Defines helper functions.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Checks if a file can be autoloaded by trying to load it in a subshell. # Checks if a file can be autoloaded by trying to load it in a subshell.
function autoloadable() { function autoloadable() {
( unfunction $1 ; autoload -U +X $1 ) &> /dev/null ( unfunction $1 ; autoload -U +X $1 ) &> /dev/null

View File

@ -1,3 +1,11 @@
#
# Sets history options.
#
# Authors:
# Robby Russell <robby@planetargon.com>
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
HISTFILE="$HOME/.zhistory" HISTFILE="$HOME/.zhistory"
HISTSIZE=10000 HISTSIZE=10000
SAVEHIST=10000 SAVEHIST=10000

View File

@ -1,4 +1,10 @@
#
# Initializes Oh My Zsh. # Initializes Oh My Zsh.
#
# Authors:
# Robby Russell <robby@planetargon.com>
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Check for the minimum supported version. # Check for the minimum supported version.
min_zsh_version='4.3.10' min_zsh_version='4.3.10'

View File

@ -1,3 +1,10 @@
#
# Sets keyboard bindings.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Dumb terminals lack support. # Dumb terminals lack support.
if [[ "$TERM" == 'dumb' ]]; then if [[ "$TERM" == 'dumb' ]]; then
return return

View File

@ -1,6 +1,13 @@
#compdef extract #compdef extract
#autoload #autoload
#
# Completes extract.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
_arguments \ _arguments \
'(-r --remove)'{-r,--remove}'[remove archive]' \ '(-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 "*::archive file:_files -g '(#i)*.(tar|tgz|tbz|tbz2|txz|tlz|gz|bz2|xz|lzma|Z|zip|rar|7z|deb)(-.)'" && return 0

View File

@ -1,6 +1,13 @@
#compdef ls-archive #compdef ls-archive
#autoload #autoload
#
# Completes ls-archive.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
_arguments \ _arguments \
'(-v --verbose)'{-v,--remove}'[verbose archive listing]' \ '(-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 "*::archive file:_files -g '(#i)*.(tar|tgz|tbz|tbz2|txz|tlz|gz|bz2|xz|lzma|Z|zip|rar|7z)(-.)'" && return 0

View File

@ -1,3 +1,10 @@
#
# Extracts the contents of popular archive formats.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
local remove_archive local remove_archive
local success local success
local file_name local file_name

View File

@ -1,3 +1,10 @@
#
# Lists the contents of popular archive formats.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
local verbose local verbose
if (( $# == 0 )); then if (( $# == 0 )); then

View File

@ -1,3 +1,11 @@
#
# Defines bundler aliases.
#
# Authors:
# Myron Marston <myron.marston@gmail.com>
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Aliases # Aliases
alias b='bundle' alias b='bundle'
alias be='b exec' alias be='b exec'

View File

@ -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 # Displays installation information for not found commands.
# installed in Ubuntu. #
# Authors:
# Joseph Jon Booker <joe@neoturbine.net>
#
if [[ -f /etc/zsh_command_not_found ]]; then if [[ -f /etc/zsh_command_not_found ]]; then
source /etc/zsh_command_not_found source /etc/zsh_command_not_found

View File

@ -1,9 +1,9 @@
# ------------------------------------------------------------------------------ #
# FILE: compleat.plugin.zsh # Loads Compleat completions.
# DESCRIPTION: oh-my-zsh plugin file. #
# AUTHOR: Sorin Ionescu <sorin.ionescu@gmail.com> # Authors:
# VERSION: 1.0.2 # Sorin Ionescu <sorin.ionescu@gmail.com>
# ------------------------------------------------------------------------------ #
if (( ${+commands[compleat]} )); then if (( ${+commands[compleat]} )); then
compleat_setup="${commands[compleat]:h:h}/share/compleat-1.0/compleat_setup" compleat_setup="${commands[compleat]:h:h}/share/compleat-1.0/compleat_setup"

View File

@ -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 <danielbarrettbolton@gmail.com>
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
print '#!/bin/sh'"\n" > apt-copy.sh 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;') list=$(perl -m'AptPkg::Cache' -e '$c=AptPkg::Cache->new; for (keys %$c){ push @a, $_ if $c->{$_}->{'CurrentState'} eq 'Installed';} print "$_ " for sort @a;')

View File

@ -1,4 +1,11 @@
# Kernel-package building shortcut. #
# Makes a dpkg Linux kernel package.
#
# Authors:
# Daniel Bolton <dbb@9y.com>
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
MAKEFLAGS='' # Temporarily unset MAKEFLAGS ( '-j3' will fail ). MAKEFLAGS='' # Temporarily unset MAKEFLAGS ( '-j3' will fail ).
appendage='-custom' # This shows up in $ (uname -r ). appendage='-custom' # This shows up in $ (uname -r ).
revision=$(date +"%Y%m%d") # This shows up in the .deb file name. revision=$(date +"%Y%m%d") # This shows up in the .deb file name.

View File

@ -1,3 +1,12 @@
#
# Defines dpkg aliases.
#
# Authors:
# Daniel Bolton <dbb@9y.com>
# Benjamin Boudreau <boudreau.benjamin@gmail.com>
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Aliases # Aliases
alias as="aptitude -F \"* %p -> %d \n(%v/%V)\" --no-gui --disable-columns search" # Search package. 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. alias ad="sudo apt-get update" # Update packages lists.

View File

@ -1,3 +1,10 @@
#
# Defines Git aliases.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Git # Git
alias g='git' alias g='git'
compdef g=git compdef g=git

View File

@ -1,4 +1,10 @@
# Get the latest Git completion. #
# Gets the latest Git completion.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
completion_file="${0:h}/completions/_git" 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' 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 if [[ ! -e "$completion_file" ]] && (( $+commands[git] )); then

View File

@ -1,6 +1,13 @@
#compdef git-hub #compdef git-hub
#autoload #autoload
#
# Completes git-hub.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
local state remotes remote branches ret=1 local state remotes remote branches ret=1
_arguments -C -s -S \ _arguments -C -s -S \

View File

@ -1,6 +1,13 @@
#compdef git-info #compdef git-info
#autoload #autoload
#
# Completes git-info.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
_arguments "1:toggle:(( _arguments "1:toggle:((
on\:'enable in-prompt information for the current repository' on\:'enable in-prompt information for the current repository'
off\:'disable in-prompt information for the current repository' off\:'disable in-prompt information for the current repository'

View File

@ -1,4 +1,10 @@
# Gets the current branch. #
# Displays the current Git branch.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
local ref="$(git symbolic-ref HEAD 2> /dev/null)" local ref="$(git symbolic-ref HEAD 2> /dev/null)"
if [[ -n "$ref" ]]; then if [[ -n "$ref" ]]; then
print "${ref#refs/heads/}" print "${ref#refs/heads/}"

View File

@ -1,4 +1,10 @@
# Open the GitHub repository in the browser. #
# Opens a GitHub repository in the default browser.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
local remote branches branch current_branch url local remote branches branch current_branch url
remote="${1:-origin}" remote="${1:-origin}"

View File

@ -1,3 +1,10 @@
#
# Displays Git repository information.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Gets the Git special action (am, merge, rebase, etc.). # Gets the Git special action (am, merge, rebase, etc.).
# Borrowed from vcs_info and edited. # Borrowed from vcs_info and edited.
function _git-action() { function _git-action() {

View File

@ -1,4 +1,10 @@
# Gets the repository root. #
# Displays the Git repository root.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
local root="$(git rev-parse --show-toplevel 2> /dev/null)" local root="$(git rev-parse --show-toplevel 2> /dev/null)"
if [[ -n "$root" ]]; then if [[ -n "$root" ]]; then
print "$root" print "$root"

View File

@ -1,5 +1,11 @@
# Hub by defunkt #
# https://github.com/defunkt/hub # Adds GitHub knowledge to the Git command.
#
# Authors:
# Chris Wanstrath <chris@wanstrath.com>
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
if (( $+commands[hub] )); then if (( $+commands[hub] )); then
function git() { function git() {
hub "$@" hub "$@"

View File

@ -1,9 +1,9 @@
# ------------------------------------------------------------------------------ #
# FILE: git.plugin.zsh # Provides Git aliases and functions.
# DESCRIPTION: oh-my-zsh plugin file. #
# AUTHOR: Sorin Ionescu <sorin.ionescu@gmail.com> # Authors:
# VERSION: 1.0.0 # Sorin Ionescu <sorin.ionescu@gmail.com>
# ------------------------------------------------------------------------------ #
# Source plugin files. # Source plugin files.
source "${0:h}/alias.zsh" source "${0:h}/alias.zsh"

View File

@ -1,4 +1,9 @@
# The default styles. #
# Defines Git information display styles.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# %s - Special action name (am, merge, rebase). # %s - Special action name (am, merge, rebase).
zstyle ':omz:plugin:git:prompt' action 'action:%s' zstyle ':omz:plugin:git:prompt' action 'action:%s'

View File

@ -1,10 +1,9 @@
# ------------------------------------------------------------------------------ #
# FILE: gnu-utils.plugin.zsh # Provides for the interactive usage of GNU Coreutils on BSD systems.
# DESCRIPTION: oh-my-zsh plugin file. #
# AUTHOR: Sorin Ionescu <sorin.ionescu@gmail.com> # Authors:
# VERSION: 1.0.2 # Sorin Ionescu <sorin.ionescu@gmail.com>
# ------------------------------------------------------------------------------ #
if (( $+commands[gdircolors] )); then if (( $+commands[gdircolors] )); then
function __gnu_utils() { function __gnu_utils() {

View File

@ -1,4 +1,10 @@
# Based on ssh-agent code. #
# Provides for an easier use of gpg-agent.
#
# Authors:
# Florian Walch <florian.walch@gmx.at>
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
local GPG_ENV="$HOME/.gnupg/gpg-agent.env" local GPG_ENV="$HOME/.gnupg/gpg-agent.env"

View File

@ -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 <sunaku@gmail.com>
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
source "${0:h}/history-substring-search.zsh" source "${0:h}/history-substring-search.zsh"

View File

@ -1,3 +1,10 @@
#
# Defines MacPorts aliases.
#
# Authors:
# Matt Cable <wozz@wookie.net>
#
# Aliases # Aliases
alias pc="sudo port clean --all installed" alias pc="sudo port clean --all installed"
alias pi="sudo port install $1" alias pi="sudo port install $1"

View File

@ -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 <sorin.ionescu@gmail.com>
#
# TODO: Make the sections easier to use. # TODO: Make the sections easier to use.
open "http://nodejs.org/docs/$(node --version | sed 's/-.*//')/api/all.html#${1}" open "http://nodejs.org/docs/$(node --version | sed 's/-.*//')/api/all.html#${1}"

View File

@ -1,4 +1,10 @@
# Complete npm. #
# Completes npm.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
cache_file="${0:h}/cache.zsh" cache_file="${0:h}/cache.zsh"
if [[ ! -f "$cache_file" ]] && (( $+commands[npm] )); then if [[ ! -f "$cache_file" ]] && (( $+commands[npm] )); then
# npm is slow; cache its output. # npm is slow; cache its output.

View File

@ -1,4 +1,10 @@
# Open man pages in Bwana. #
# Opens man pages in Bwana.app.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
function manb() { function manb() {
local page local page
if (( $# > 0 )); then if (( $# > 0 )); then

View File

@ -1,4 +1,10 @@
# Open man pages in Preview. #
# Opens man pages in Preview.app.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
function manp() { function manp() {
local page local page
if (( $# > 0 )); then if (( $# > 0 )); then

View File

@ -1,3 +1,10 @@
#
# Displays the current Finder.app directory.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
osascript 2>/dev/null <<EOF osascript 2>/dev/null <<EOF
tell application "Finder" tell application "Finder"
return POSIX path of (target of window 1 as alias) return POSIX path of (target of window 1 as alias)

View File

@ -1,3 +1,10 @@
#
# Displays the current Finder.app selection.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
osascript 2>/dev/null <<EOF osascript 2>/dev/null <<EOF
set output to "" set output to ""
tell application "Finder" to set the_selection to selection tell application "Finder" to set the_selection to selection

View File

@ -1,3 +1,10 @@
#
# Opens a new Terminal.app/iTerm.app tab in the current directory.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
local command="cd \\\"$PWD\\\"" local command="cd \\\"$PWD\\\""
(( $# > 0 )) && command="${command}; $*" (( $# > 0 )) && command="${command}; $*"

View File

@ -1,3 +1,10 @@
#
# Moves directories and files to Trash.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
print -N "${@:a}" | xargs -0 osascript -e ' print -N "${@:a}" | xargs -0 osascript -e '
on run theFilePaths on run theFilePaths
tell application "Finder" tell application "Finder"

View File

@ -1,4 +1,9 @@
#
# Defines Mac OS X aliases and functions.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com> # Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Change directory to the current Finder directory. # Change directory to the current Finder directory.
alias cdf='cd "$(pfd)"' alias cdf='cd "$(pfd)"'

View File

@ -1,4 +1,11 @@
# List disowned files. #
# Lists pacman disowned files.
#
# Authors:
# Benjamin Boudreau <dreurmail@gmail.com>
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
tmp="${TMPDIR-/tmp}/pacman-disowned-$UID-$$" tmp="${TMPDIR-/tmp}/pacman-disowned-$UID-$$"
db="$tmp/db" db="$tmp/db"
fs="$tmp/fs" fs="$tmp/fs"

View File

@ -1,4 +1,11 @@
# List explicitly installed packages. #
# Lists explicitly installed pacman packages.
#
# Authors:
# Benjamin Boudreau <dreurmail@gmail.com>
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
sudo pacman -Qei $(pacman -Qu|cut -d" " -f 1) \ 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}' | awk ' BEGIN {FS=":"}/^Name/{printf("\033[1;36m%s\033[1;37m", $2)}/^Description/{print $2}'

View File

@ -1,7 +1,13 @@
# Arch Linux Zsh Aliases and Functions
# #
# Pacman Tips: # Defines pacman aliases.
#
# Authors:
# Benjamin Boudreau <dreurmail@gmail.com>
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Tips:
# https://wiki.archlinux.org/index.php/Pacman_Tips # https://wiki.archlinux.org/index.php/Pacman_Tips
#
# Yaourt Aliases # Yaourt Aliases
if (( $+commands[yaourt] )); then if (( $+commands[yaourt] )); then

View File

@ -1,6 +1,13 @@
#compdef prep #compdef prep
#autoload #autoload
#
# Completes prep.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
_arguments \ _arguments \
'-i[ignore case]' \ '-i[ignore case]' \
'-m[^ and $ match the start and the end of a line]' \ '-m[^ and $ match the start and the end of a line]' \

View File

@ -1,6 +1,13 @@
#compdef psub #compdef psub
#autoload #autoload
#
# Completes psub.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
_arguments \ _arguments \
'-g[match globally]' \ '-g[match globally]' \
'-i[ignore case]' \ '-i[ignore case]' \

View File

@ -1,4 +1,9 @@
# Perl Grep #
# Provides a grep-like pattern search.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
local usage pattern modifiers invert local usage pattern modifiers invert

View File

@ -1,4 +1,9 @@
# Perl Substitution #
# Provides a sed-like pattern substitution.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
local usage pattern replacement modifiers local usage pattern replacement modifiers

View File

@ -1,3 +1,10 @@
#
# Enables local Perl module installation on Mac OS X and defines aliases.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# For Perl older than 5.10.14, install local::lib. # 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 # 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 # tar xvf local-lib-1.008004.tar.gz

View File

@ -1,3 +1,10 @@
#
# Enables local Python package installation.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Prepend PEP 370 per user site packages directory, which defaults to # Prepend PEP 370 per user site packages directory, which defaults to
# ~/Library/Python on Mac OS X and ~/.local elsewhere, to PATH/MANPATH. # ~/Library/Python on Mac OS X and ~/.local elsewhere, to PATH/MANPATH.
if [[ "$OSTYPE" == darwin* ]]; then if [[ "$OSTYPE" == darwin* ]]; then

View File

@ -1,3 +1,12 @@
#
# Defines Ruby on Rails aliases.
#
# Authors:
# Robby Russell <robby@planetargon.com>
# Jake Bell <jake.b.bell@gmail.com>
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Aliases (compatible with Rails 2) # Aliases (compatible with Rails 2)
alias rc='_rails-command console' alias rc='_rails-command console'
alias rd='_rails-command destroy' alias rd='_rails-command destroy'

View File

@ -1,3 +1,10 @@
#
# Defines rsync aliases.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Aliases # Aliases
rsync_cmd='rsync --verbose --progress --human-readable --compress --archive --hard-links --one-file-system' rsync_cmd='rsync --verbose --progress --human-readable --compress --archive --hard-links --one-file-system'

View File

@ -1,3 +1,10 @@
#
# Configures Ruby gem installation and loads rvm/rbenv.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Install local gems according to Mac OS X conventions. # Install local gems according to Mac OS X conventions.
if [[ "$OSTYPE" == darwin* ]]; then if [[ "$OSTYPE" == darwin* ]]; then
export GEM_HOME="$HOME/Library/Ruby/Gems/${$(ruby --version)[6,8]}" export GEM_HOME="$HOME/Library/Ruby/Gems/${$(ruby --version)[6,8]}"

View File

@ -1,9 +1,9 @@
# ------------------------------------------------------------------------------ #
# FILE: screen.plugin.zsh # Defines GNU Screen aliases and provides for auto launching it at startup.
# DESCRIPTION: oh-my-zsh plugin file. #
# AUTHOR: Sorin Ionescu <sorin.ionescu@gmail.com> # Authors:
# VERSION: 1.0.0 # Sorin Ionescu <sorin.ionescu@gmail.com>
# ------------------------------------------------------------------------------ #
# Aliases # Aliases
alias sl="screen -list" alias sl="screen -list"

View File

@ -1,25 +1,24 @@
# #
# INSTRUCTIONS # Provides for an easier use of ssh-agent.
# #
# To enabled agent forwarding support, add the following to # Authors:
# your .zshrc file: # Robby Russell <robby@planetargon.com>
# Theodore Robert Campbell Jr <trcjr@stupidfoot.com>
# Joseph M. Reagle Jr. <reagle@mit.edu>
# Florent Thoumie <flz@xbsd.org>
# Jonas Pfenniger <jonas@pfenniger.name>
# gwjo <gowen72@gmail.com>
# Sorin Ionescu <sorin.ionescu@gmail.com>
# #
# 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 # zstyle ':omz:plugin:ssh-agent' forwarding 'yes'
# example: #
# To load multiple identies, add the following to your .zshrc:
# #
# zstyle ':omz:plugin:ssh-agent' identities 'id_rsa' 'id_rsa2' 'id_github' # 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_env="$HOME/.ssh/environment-$HOST"
_ssh_agent_forwarding= _ssh_agent_forwarding=

View File

@ -1,9 +1,9 @@
# ------------------------------------------------------------------------------ #
# FILE: tmux.plugin.zsh # Defines tmux aliases and provides for auto launching it at startup.
# DESCRIPTION: oh-my-zsh plugin file. #
# AUTHOR: Sorin Ionescu <sorin.ionescu@gmail.com> # Authors:
# VERSION: 1.0.0 # Sorin Ionescu <sorin.ionescu@gmail.com>
# ------------------------------------------------------------------------------ #
# Aliases # Aliases
alias ta="tmux attach-session" alias ta="tmux attach-session"

View File

@ -1,5 +1,13 @@
#compdef wake #compdef wake
#autoload #autoload
#
# Completes wake.
#
# Authors:
# Paul Gideon Dann <pdgiddie@gmail.com>
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
_arguments "1:device to wake:_files -W '$HOME/.wakeonlan'" && return 0 _arguments "1:device to wake:_files -W '$HOME/.wakeonlan'" && return 0

View File

@ -1,3 +1,11 @@
#
# Wakes devices via wakeonlan.
#
# Authors:
# Paul Gideon Dann <pdgiddie@gmail.com>
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
local config_file="$HOME/.wakeonlan/$1" local config_file="$HOME/.wakeonlan/$1"
if [[ ! -f "$config_file" ]]; then if [[ ! -f "$config_file" ]]; then
print "$0: no such device file: $1" >&2 print "$0: no such device file: $1" >&2

View File

@ -1,3 +1,11 @@
#
# Defines yum aliases.
#
# Authors:
# Simon <contact@saimon.org>
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Aliases # Aliases
alias ys="yum search" # Search package. alias ys="yum search" # Search package.
alias yp="yum info" # Show package info. alias yp="yum info" # Show package info.

View File

@ -1,13 +1,9 @@
# ------------------------------------------------------------------------------ #
# FILE: z.plugin.zsh # Maintains a frequently used directory list for fast directory changes.
# DESCRIPTION: oh-my-zsh plugin file. #
# AUTHOR: Sorin Ionescu <sorin.ionescu@gmail.com> # Authors:
# VERSION: 1.0.0 # Sorin Ionescu <sorin.ionescu@gmail.com>
# ------------------------------------------------------------------------------ #
# z is the new j.
# https://github.com/rupa/z
if [[ -f /etc/profile.d/z.zsh ]]; then if [[ -f /etc/profile.d/z.zsh ]]; then
source /etc/profile.d/z.zsh source /etc/profile.d/z.zsh

View File

@ -1,6 +1,10 @@
# A script to make using 256 colors in Zsh less painful. #
# Provides for easier formatting and use of 256 colors.
#
# Authors:
# P.C. Shyamshankar <sykora@lucentbeing.com> # P.C. Shyamshankar <sykora@lucentbeing.com>
# Sorin Ionescu <sorin.ionescu@gmail.com> # Sorin Ionescu <sorin.ionescu@gmail.com>
#
typeset -Ag FX FG BG typeset -Ag FX FG BG

View File

@ -1,3 +1,10 @@
#
# Sets Oh My Zsh options.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Set the key mapping style to 'emacs' or 'vi'. # Set the key mapping style to 'emacs' or 'vi'.
zstyle ':omz:editor' keymap 'emacs' zstyle ':omz:editor' keymap 'emacs'

View File

@ -1,3 +1,11 @@
#
# Sets terminal window and tab titles.
#
# Authors:
# James Cox <james@imaj.es>
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Dumb terminals lack support. # Dumb terminals lack support.
if [[ "$TERM" == 'dumb' ]]; then if [[ "$TERM" == 'dumb' ]]; then
return return

View File

@ -1,3 +1,11 @@
#
# A monochrome theme that displays basic information.
#
# Authors:
# Brian Tse <briankftse@gmail.com>
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
function +vi-git-status() { function +vi-git-status() {
# Untracked files. # Untracked files.
if [[ -n $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then if [[ -n $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then

View File

@ -1,14 +1,20 @@
# ------------------------------------------------------------------------------ #
# Prompt for Zsh: # A simple theme that displays only relevant information.
# * One line. #
# * VCS info on the right prompt. # Authors:
# * Only shows the path on the left prompt by default. # Julien Nicoulaud <julien.nicoulaud@gmail.com>
# * Crops the path to a defined length and only shows the path relative to # Sorin Ionescu <sorin.ionescu@gmail.com>
#
# 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. # the current VCS repository root.
# * Wears a different color wether the last command succeeded/failed. # - Uses a different color depending on if the last command succeeded/failed.
# * Shows user@hostname if connected through SSH. # - Shows user@hostname if connected through SSH.
# * Shows if logged in as root or not. # - Shows if logged in as root or not.
# ------------------------------------------------------------------------------ #
function prompt_nicoulaj_setup() { function prompt_nicoulaj_setup() {
setopt LOCAL_OPTIONS setopt LOCAL_OPTIONS

View File

@ -1,10 +1,13 @@
# ------------------------------------------------------------------------------ #
# FILE: prompt_sorin_setup # A simple theme that only shows relevant information.
# DESCRIPTION: oh-my-zsh theme file. #
# AUTHOR: Sorin Ionescu <sorin.ionescu@gmail.com> # Authors:
# VERSION: 1.0.6 # Sorin Ionescu <sorin.ionescu@gmail.com>
# SCREENSHOT: http://i.imgur.com/aipDQ.png #
# ------------------------------------------------------------------------------ # Screenshots:
# http://i.imgur.com/aipDQ.png
#
function prompt_sorin_precmd () { function prompt_sorin_precmd () {
setopt LOCAL_OPTIONS setopt LOCAL_OPTIONS
unsetopt XTRACE KSH_ARRAYS unsetopt XTRACE KSH_ARRAYS

View File

@ -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: # A theme based on Steve Losh's prompt with VCS_INFO integration.
# http://www.jukie.net/bart/blog/pimping-out-zsh-prompt #
# Authors:
# Steve Losh <steve@stevelosh.com>
# Bart Trojanowski <bart@jukie.net>
# Brian Carper <brian@carper.ca>
# steeef <steeef@gmail.com>
# Sorin Ionescu <sorin.ionescu@gmail.com>
# #
# Git untracked files modification from Brian Carper:
# http://briancarper.net/blog/570/git-info-in-your-zsh-prompt
function virtualenv_info() { function virtualenv_info() {
if [[ -n "$VIRTUAL_ENV" ]]; then if [[ -n "$VIRTUAL_ENV" ]]; then

View File

@ -1,3 +1,12 @@
#
# Defines utility functions.
#
# Authors:
# Robby Russell <robby@planetargon.com>
# Suraj N. Kurapati <sunaku@gmail.com>
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Lists the ten most used commands. # Lists the ten most used commands.
alias history-stat="history | awk '{print \$2}' | sort | uniq -c | sort -n -r | head" alias history-stat="history | awk '{print \$2}' | sort | uniq -c | sort -n -r | head"