From bb5f18327ef1ea358a24a38e8c8fbd9b1cd78883 Mon Sep 17 00:00:00 2001 From: Matt McManus Date: Wed, 1 Apr 2015 17:49:09 -0400 Subject: [PATCH] So long zsh --- tag-zsh/zlogin | 23 --------- tag-zsh/zsh/completion/_ag | 9 ---- tag-zsh/zsh/completion/_bundler | 69 -------------------------- tag-zsh/zsh/completion/_cucumber | 3 -- tag-zsh/zsh/completion/_production | 2 - tag-zsh/zsh/completion/_rspec | 3 -- tag-zsh/zsh/completion/_staging | 2 - tag-zsh/zsh/functions/change-extension | 9 ---- tag-zsh/zsh/functions/envup | 10 ---- tag-zsh/zsh/functions/g | 12 ----- tag-zsh/zsh/functions/mcd | 5 -- tag-zsh/zsh/functions/rake | 7 --- tag-zsh/zsh/functions/rspec | 7 --- tag-zsh/zshrc | 60 ---------------------- 14 files changed, 221 deletions(-) delete mode 100755 tag-zsh/zlogin delete mode 100755 tag-zsh/zsh/completion/_ag delete mode 100755 tag-zsh/zsh/completion/_bundler delete mode 100755 tag-zsh/zsh/completion/_cucumber delete mode 100755 tag-zsh/zsh/completion/_production delete mode 100755 tag-zsh/zsh/completion/_rspec delete mode 100755 tag-zsh/zsh/completion/_staging delete mode 100755 tag-zsh/zsh/functions/change-extension delete mode 100755 tag-zsh/zsh/functions/envup delete mode 100755 tag-zsh/zsh/functions/g delete mode 100755 tag-zsh/zsh/functions/mcd delete mode 100755 tag-zsh/zsh/functions/rake delete mode 100755 tag-zsh/zsh/functions/rspec delete mode 100755 tag-zsh/zshrc diff --git a/tag-zsh/zlogin b/tag-zsh/zlogin deleted file mode 100755 index a034365..0000000 --- a/tag-zsh/zlogin +++ /dev/null @@ -1,23 +0,0 @@ -# adds the current branch name in green -git_prompt_info() { - ref=$(git symbolic-ref HEAD 2> /dev/null) - if [[ -n $ref ]]; then - echo "[%{$fg_bold[green]%}${ref#refs/heads/}%{$reset_color%}]" - fi -} - -# makes color constants available -autoload -U colors -colors - -# enable colored output from ls, etc -export CLICOLOR=1 - -# expand functions in the prompt -setopt promptsubst - -# prompt -export PS1='$(git_prompt_info)[${SSH_CONNECTION+"%{$fg_bold[green]%}%n@%m:"}%{$fg_bold[blue]%}%~%{$reset_color%}] ' - -# load thoughtbot/dotfiles scripts -export PATH="$HOME/.bin:$PATH" diff --git a/tag-zsh/zsh/completion/_ag b/tag-zsh/zsh/completion/_ag deleted file mode 100755 index 699e71d..0000000 --- a/tag-zsh/zsh/completion/_ag +++ /dev/null @@ -1,9 +0,0 @@ -#compdef ag - -if (( CURRENT == 2 )); then - if [[ -a tmp/tags ]]; then - compadd $(cut -f 1 tmp/tags | uniq) - fi -else; - _files -fi diff --git a/tag-zsh/zsh/completion/_bundler b/tag-zsh/zsh/completion/_bundler deleted file mode 100755 index 767e559..0000000 --- a/tag-zsh/zsh/completion/_bundler +++ /dev/null @@ -1,69 +0,0 @@ -#compdef bundle - -local curcontext="$curcontext" state line _gems _opts ret=1 - -_arguments -C -A "-v" -A "--version" \ - '(- 1 *)'{-v,--version}'[display version information]' \ - '1: :->cmds' \ - '*:: :->args' && ret=0 - -case $state in - cmds) - _values "bundle command" \ - "install[Install the gems specified by the Gemfile or Gemfile.lock]" \ - "update[Update dependencies to their latest versions]" \ - "package[Package the .gem files required by your application]" \ - "exec[Execute a script in the context of the current bundle]" \ - "config[Specify and read configuration options for bundler]" \ - "check[Determine whether the requirements for your application are installed]" \ - "list[Show all of the gems in the current bundle]" \ - "show[Show the source location of a particular gem in the bundle]" \ - "console[Start an IRB session in the context of the current bundle]" \ - "open[Open an installed gem in the editor]" \ - "viz[Generate a visual representation of your dependencies]" \ - "init[Generate a simple Gemfile, placed in the current directory]" \ - "gem[Create a simple gem, suitable for development with bundler]" \ - "help[Describe available tasks or one specific task]" - ret=0 - ;; - args) - case $line[1] in - help) - _values 'commands' 'install update package exec config check list show console open viz init gem help' && ret=0 - ;; - install) - _arguments \ - '(--no-color)--no-color[disable colorization in output]' \ - '(--local)--local[do not attempt to connect to rubygems.org]' \ - '(--quiet)--quiet[only output warnings and errors]' \ - '(--gemfile)--gemfile=-[use the specified gemfile instead of Gemfile]:gemfile' \ - '(--system)--system[install to the system location]' \ - '(--deployment)--deployment[install using defaults tuned for deployment environments]' \ - '(--frozen)--frozen[do not allow the Gemfile.lock to be updated after this install]' \ - '(--path)--path=-[specify a different path than the system default]:path:_files' \ - '(--binstubs)--binstubs=-[generate bin stubs for bundled gems to ./bin]:directory:_files' \ - '(--without)--without=-[exclude gems that are part of the specified named group]:groups' - ret=0 - ;; - exec) - _normal && ret=0 - ;; - (open|show) - _gems=( $(bundle show 2> /dev/null | sed -e '/^ \*/!d; s/^ \* \([^ ]*\) .*/\1/') ) - if [[ $_gems != "" ]]; then - _values 'gems' $_gems && ret=0 - fi - ;; - *) - _opts=( $(bundle help $line[1] | sed -e '/^ \[-/!d; s/^ \[\(-[^=]*\)=.*/\1/') ) - _opts+=( $(bundle help $line[1] | sed -e '/^ -/!d; s/^ \(-.\), \[\(-[^=]*\)=.*/\1 \2/') ) - if [[ $_opts != "" ]]; then - _values 'options' $_opts && ret=0 - fi - ;; - esac - ;; -esac - -return ret - diff --git a/tag-zsh/zsh/completion/_cucumber b/tag-zsh/zsh/completion/_cucumber deleted file mode 100755 index 49c6415..0000000 --- a/tag-zsh/zsh/completion/_cucumber +++ /dev/null @@ -1,3 +0,0 @@ -#compdef cucumber - -compadd -P features/ -S .feature `ls features/**/*.feature | sed -E "s/features\/|\.feature//g"` diff --git a/tag-zsh/zsh/completion/_production b/tag-zsh/zsh/completion/_production deleted file mode 100755 index a124346..0000000 --- a/tag-zsh/zsh/completion/_production +++ /dev/null @@ -1,2 +0,0 @@ -#compdef production -compdef production=heroku diff --git a/tag-zsh/zsh/completion/_rspec b/tag-zsh/zsh/completion/_rspec deleted file mode 100755 index f6bc569..0000000 --- a/tag-zsh/zsh/completion/_rspec +++ /dev/null @@ -1,3 +0,0 @@ -#compdef rspec - -compadd -P spec/ `ls spec/**/*_spec.rb | sed -E "s/spec\///g"` diff --git a/tag-zsh/zsh/completion/_staging b/tag-zsh/zsh/completion/_staging deleted file mode 100755 index fdcd38f..0000000 --- a/tag-zsh/zsh/completion/_staging +++ /dev/null @@ -1,2 +0,0 @@ -#compdef staging -compdef staging=heroku diff --git a/tag-zsh/zsh/functions/change-extension b/tag-zsh/zsh/functions/change-extension deleted file mode 100755 index 596b9c5..0000000 --- a/tag-zsh/zsh/functions/change-extension +++ /dev/null @@ -1,9 +0,0 @@ -# Change file extensions recursively in current directory -# -# change-extension erb haml - -function change-extension() { - foreach f (**/*.$1) - mv $f $f:r.$2 - end -} diff --git a/tag-zsh/zsh/functions/envup b/tag-zsh/zsh/functions/envup deleted file mode 100755 index 99ea286..0000000 --- a/tag-zsh/zsh/functions/envup +++ /dev/null @@ -1,10 +0,0 @@ -# Load .env file into shell session for environment variables - -function envup() { - if [ -f .env ]; then - export `cat .env` - else - echo 'No .env file found' 1>&2 - return 1 - fi -} diff --git a/tag-zsh/zsh/functions/g b/tag-zsh/zsh/functions/g deleted file mode 100755 index 494e716..0000000 --- a/tag-zsh/zsh/functions/g +++ /dev/null @@ -1,12 +0,0 @@ -# No arguments: `git status` -# With arguments: acts like `git` -g() { - if [[ $# > 0 ]]; then - git $@ - else - git status - fi -} - -# Complete g like git -compdef g=git diff --git a/tag-zsh/zsh/functions/mcd b/tag-zsh/zsh/functions/mcd deleted file mode 100755 index 4154b02..0000000 --- a/tag-zsh/zsh/functions/mcd +++ /dev/null @@ -1,5 +0,0 @@ -# Make directory and change into it. - -function mcd() { - mkdir -p "$1" && cd "$1"; -} diff --git a/tag-zsh/zsh/functions/rake b/tag-zsh/zsh/functions/rake deleted file mode 100755 index 1a4f421..0000000 --- a/tag-zsh/zsh/functions/rake +++ /dev/null @@ -1,7 +0,0 @@ -rake() { - if [ -S .zeus.sock ]; then - zeus rake "$@" - else - command rake "$@" - fi -} diff --git a/tag-zsh/zsh/functions/rspec b/tag-zsh/zsh/functions/rspec deleted file mode 100755 index 330f267..0000000 --- a/tag-zsh/zsh/functions/rspec +++ /dev/null @@ -1,7 +0,0 @@ -rspec() { - if [ -S .zeus.sock ]; then - zeus rspec "$@" - else - command rspec "$@" - fi -} diff --git a/tag-zsh/zshrc b/tag-zsh/zshrc deleted file mode 100755 index f002a26..0000000 --- a/tag-zsh/zshrc +++ /dev/null @@ -1,60 +0,0 @@ -# load our own completion functions -fpath=(~/.zsh/completion $fpath) - -# completion -autoload -U compinit -compinit - -for function in ~/.zsh/functions/*; do - source $function -done - -# history settings -setopt histignoredups -SAVEHIST=4096 -HISTSIZE=4096 - -# awesome cd movements from zshkit -setopt autocd autopushd pushdminus pushdsilent pushdtohome cdablevars -DIRSTACKSIZE=5 - -# Try to correct command line spelling -setopt correct correctall - -# Enable extended globbing -setopt extendedglob - -# Allow [ or ] whereever you want -unsetopt nomatch - -# vi mode -bindkey -v -bindkey "^F" vi-cmd-mode -bindkey jj vi-cmd-mode - -# handy keybindings -bindkey "^A" beginning-of-line -bindkey "^E" end-of-line -bindkey "^R" history-incremental-search-backward -bindkey "^P" history-search-backward -bindkey "^Y" accept-and-hold -bindkey "^N" insert-last-word -bindkey -s "^T" "^[Isudo ^[A" # "t" for "toughguy" - -# use vim as the visual editor -export VISUAL=vim -export EDITOR=$VISUAL - -# look for ey config in project dirs -export EYRC=./.eyrc - -# load rbenv if available -if which rbenv &>/dev/null ; then - eval "$(rbenv init - --no-rehash)" -fi - -# mkdir .git/safe in the root of repositories you trust -export PATH=".git/safe/../../bin:$PATH" - -# aliases -[[ -f ~/.aliases ]] && source ~/.aliases