1
0
Fork 0

Added or edited file headers.

pull/9/head
Sorin Ionescu 13 years ago
parent e1a71a84b1
commit b96bbca51c

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

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

@ -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_PUSHD # Push the old directory onto the stack on cd.
setopt PUSHD_IGNORE_DUPS # Don't store duplicates in the stack.

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

@ -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() {
(( $# == 0 )) && set -- *
if [[ "$OSTYPE" == linux* ]]; then

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

@ -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.
function autoloadable() {
( unfunction $1 ; autoload -U +X $1 ) &> /dev/null

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

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

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

@ -1,6 +1,13 @@
#compdef extract
#autoload
#
# Completes extract.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
_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

@ -1,6 +1,13 @@
#compdef ls-archive
#autoload
#
# Completes ls-archive.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
_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

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

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

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

@ -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 <joe@neoturbine.net>
#
if [[ -f /etc/zsh_command_not_found ]]; then
source /etc/zsh_command_not_found

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

@ -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
list=$(perl -m'AptPkg::Cache' -e '$c=AptPkg::Cache->new; for (keys %$c){ push @a, $_ if $c->{$_}->{'CurrentState'} eq 'Installed';} print "$_ " for sort @a;')

@ -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 ).
appendage='-custom' # This shows up in $ (uname -r ).
revision=$(date +"%Y%m%d") # This shows up in the .deb file name.

@ -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
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.

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

@ -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_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

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

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

@ -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)"
if [[ -n "$ref" ]]; then
print "${ref#refs/heads/}"

@ -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
remote="${1:-origin}"

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

@ -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)"
if [[ -n "$root" ]]; then
print "$root"

@ -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
function git() {
hub "$@"

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

@ -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).
zstyle ':omz:plugin:git:prompt' action 'action:%s'

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

@ -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"

@ -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"

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

@ -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.
open "http://nodejs.org/docs/$(node --version | sed 's/-.*//')/api/all.html#${1}"

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

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

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

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

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

@ -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\\\""
(( $# > 0 )) && command="${command}; $*"

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

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

@ -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-$$"
db="$tmp/db"
fs="$tmp/fs"

@ -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) \
| awk ' BEGIN {FS=":"}/^Name/{printf("\033[1;36m%s\033[1;37m", $2)}/^Description/{print $2}'

@ -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
#
# Yaourt Aliases
if (( $+commands[yaourt] )); then

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

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

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

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

@ -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.
# 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

@ -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
# ~/Library/Python on Mac OS X and ~/.local elsewhere, to PATH/MANPATH.
if [[ "$OSTYPE" == darwin* ]]; then

@ -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)
alias rc='_rails-command console'
alias rd='_rails-command destroy'

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

@ -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.
if [[ "$OSTYPE" == darwin* ]]; then
export GEM_HOME="$HOME/Library/Ruby/Gems/${$(ruby --version)[6,8]}"

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

@ -1,24 +1,23 @@
#
# INSTRUCTIONS
# Provides for an easier use of ssh-agent.
#
# To enabled agent forwarding support, add the following to
# your .zshrc file:
# Authors:
# 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
# example:
# zstyle ':omz:plugin:ssh-agent' forwarding 'yes'
#
# zstyle ':omz:plugin:ssh-agent' identities 'id_rsa' 'id_rsa2' 'id_github'
#
#
# CREDITS
# To load multiple identies, add the following to your .zshrc:
#
# 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
# zstyle ':omz:plugin:ssh-agent' identities 'id_rsa' 'id_rsa2' 'id_github'
#
_ssh_agent_env="$HOME/.ssh/environment-$HOST"

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

@ -1,5 +1,13 @@
#compdef wake
#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

@ -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"
if [[ ! -f "$config_file" ]]; then
print "$0: no such device file: $1" >&2

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

@ -1,13 +1,9 @@
# ------------------------------------------------------------------------------
# FILE: z.plugin.zsh
# DESCRIPTION: oh-my-zsh plugin file.
# AUTHOR: Sorin Ionescu <sorin.ionescu@gmail.com>
# 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 <sorin.ionescu@gmail.com>
#
if [[ -f /etc/profile.d/z.zsh ]]; then
source /etc/profile.d/z.zsh

@ -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>
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
typeset -Ag FX FG BG

@ -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'.
zstyle ':omz:editor' keymap 'emacs'

@ -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.
if [[ "$TERM" == 'dumb' ]]; then
return

@ -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() {
# Untracked files.
if [[ -n $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then

@ -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 <julien.nicoulaud@gmail.com>
# 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.
# * 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

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

@ -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 <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() {
if [[ -n "$VIRTUAL_ENV" ]]; then

@ -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.
alias history-stat="history | awk '{print \$2}' | sort | uniq -c | sort -n -r | head"

Loading…
Cancel
Save