zsh_dots 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. data/.gitignore +25 -0
  2. data/.gitmodules +3 -0
  3. data/.rvmrc +47 -0
  4. data/Gemfile +7 -0
  5. data/Gemfile.lock +38 -0
  6. data/README.md +115 -0
  7. data/Rakefile +9 -0
  8. data/bin/dots +7 -0
  9. data/bin/elocal_nightly.sh +12 -0
  10. data/bin/gbrt +42 -0
  11. data/bin/git_cwd_info +40 -0
  12. data/bin/lein +229 -0
  13. data/bin/reattach-to-user-namespace +0 -0
  14. data/bin/ssh-copy-id +54 -0
  15. data/bin/stock +83 -0
  16. data/config/.dot_file +1 -0
  17. data/config/aws +0 -0
  18. data/config/example.aws.zsh +13 -0
  19. data/config/gemrc +9 -0
  20. data/config/gitconfig +46 -0
  21. data/config/railsrc +2 -0
  22. data/config/rspec +2 -0
  23. data/config/rvmrc +1 -0
  24. data/config/screenrc +1 -0
  25. data/config/tmux.conf +6 -0
  26. data/config/zlogin +1 -0
  27. data/config/zshenv +59 -0
  28. data/config/zshrc +8 -0
  29. data/etc/mandlebrot.c +59 -0
  30. data/etc/rails/composer.yml +30 -0
  31. data/etc/rails/ember_template.rb +60 -0
  32. data/etc/rails/recipes/haml_views.rb +20 -0
  33. data/etc/rails/recipes/html5.rb +84 -0
  34. data/etc/rails/recipes/readme_markdown.rb +87 -0
  35. data/etc/rails/template.rb +1419 -0
  36. data/lib/dots/aliases.zsh +40 -0
  37. data/lib/dots/directories.zsh +28 -0
  38. data/lib/dots/functions.zsh +41 -0
  39. data/lib/dots/plugins.zsh +18 -0
  40. data/lib/dots.sh +11 -0
  41. data/lib/plugins/aws/aws.plugin.zsh +20 -0
  42. data/lib/plugins/bundler/_bundler +82 -0
  43. data/lib/plugins/bundler/bundler.plugin.zsh +7 -0
  44. data/lib/plugins/git/git.plugin.zsh +126 -0
  45. data/lib/plugins/git-flow/git-flow.plugin.zsh +340 -0
  46. data/lib/plugins/knife/_knife +183 -0
  47. data/lib/plugins/knife/knife.plugin.zsh +1 -0
  48. data/lib/plugins/macvim/macvim.plugin.zsh +13 -0
  49. data/lib/plugins/osx/_man-preview +5 -0
  50. data/lib/plugins/osx/osx.plugin.zsh +101 -0
  51. data/lib/plugins/rails3/rails3.plugin.zsh +75 -0
  52. data/lib/plugins/rake/rake.plugin.zsh +6 -0
  53. data/lib/plugins/ruby/ruby.plugin.zsh +58 -0
  54. data/lib/ruby/dots/command.rb +58 -0
  55. data/lib/ruby/dots/dot_file.rb +73 -0
  56. data/lib/ruby/dots/version.rb +3 -0
  57. data/lib/ruby/dots.rb +9 -0
  58. data/lib/tasks/db.rake +55 -0
  59. data/lib/tasks/dots.rake +32 -0
  60. data/spec/integration/command_spec.rb +34 -0
  61. data/spec/models/dot_file_spec.rb +45 -0
  62. data/spec/spec_helper.rb +6 -0
  63. data/vendor/antigen.zsh +251 -0
  64. data/vendor/oh-my-zsh/check_for_upgrade.sh +45 -0
  65. data/vendor/oh-my-zsh/install.sh +43 -0
  66. data/vendor/oh-my-zsh/require_tool.sh +161 -0
  67. data/vendor/oh-my-zsh/uninstall.sh +20 -0
  68. data/vendor/oh-my-zsh/upgrade.sh +6 -0
  69. data/zsh_dots.gemspec +28 -0
  70. metadata +163 -0
@@ -0,0 +1,40 @@
1
+ # = Aliases
2
+ #
3
+ # General purpose, time-saving aliases for everyday use.
4
+
5
+ # Access the superuser for a single command.
6
+ alias _='sudo'
7
+
8
+ # Show command history.
9
+ alias history='fc -l 1'
10
+
11
+ # Use grep with ack.
12
+ alias afind='ack-grep -il'
13
+
14
+ # Reload DOTS after a change.
15
+ alias reload="source $HOME/.zshenv; source $HOME/.zshrc"
16
+ alias refresh="reload && clear"
17
+
18
+ # Reload TextMate bundles.
19
+ alias tmbundle="osascript -e 'tell app \"TextMate\" to reload bundles'"
20
+
21
+ # Find all ._* files in the directory and remove them.
22
+ alias rmbs="find . -type f -name '._*' -exec rm {} + && echo \"Removed all ._ files\""
23
+
24
+ # Make `ed` easier to use.
25
+ alias ed='ed -p "ed> "'
26
+
27
+ # Dotfiles persistence
28
+ alias persist='dots persist'
29
+ alias forget='dots forget'
30
+
31
+ # File viewing and editing
32
+ alias v=$PAGER
33
+
34
+ # Terminal support
35
+ alias c='clear'
36
+ alias ti='set_title'
37
+ alias o='open .'
38
+
39
+ # Ripple
40
+ alias ripple='open /Applications/Google\ Chrome\ Canary.app --args -disable-web-security'
@@ -0,0 +1,28 @@
1
+ # = Directories
2
+ #
3
+ # Quick aliases for development endpoints.
4
+
5
+ # eLocal web application
6
+ elocal=$HOME/Code/elocal
7
+ alias elocal='nocorrect elocal'
8
+
9
+ # eLocal Chef server(s) configuration
10
+ kitchen=$HOME/Code/elocal/chef_scripts
11
+ alias kitchen='nocorrect kitchen'
12
+ alias chef_scripts='nocorrect kitchen'
13
+
14
+ # eLocal Affiliates API
15
+ affiliates=$HOME/Code/affiliates
16
+ alias affiliates='nocorrect affiliates'
17
+
18
+ # psychedeli.ca
19
+ blog=$HOME/Code/blog
20
+ alias blog='nocorrect blog'
21
+
22
+ # Diaspora
23
+ diaspora=$HOME/Code/diaspora
24
+ alias diaspora='nocorrect diaspora'
25
+
26
+ # Personal Chef configuration
27
+ skynet=$HOME/Code/skynet
28
+ alias skynet='nocorrect skynet'
@@ -0,0 +1,41 @@
1
+ # = Functions
2
+ #
3
+ # New commands that were a bit complicated for simple aliases, or otherwise didn't
4
+ # work in the alias world. All kinds of functionality here.
5
+
6
+ # Installs the "OSX For Hackers" shellscript, which plays with some of the OS X defaults to give you
7
+ # a faster and more enjoyable experience, albeit with a little less minimalism going on.
8
+ #
9
+ # WARNING: THIS WILL AFFECT YOUR OSX ENVIRONMENT. PLEASE READ THE FOLLOWING URL BEFORE CONTINUING:
10
+ # => https://github.com/mathiasbynens/dotfiles/blob/master/.osx
11
+ function osx_for_hackers() {
12
+ source $DOTS/tools/osx.zsh
13
+ }
14
+
15
+ # Search the process list for a specific expression using grep.
16
+ function proc() {
17
+ ps -A | grep $1
18
+ }
19
+
20
+ # Load the README.md file into mvim as well as the current directory, as defined by the
21
+ # functionality of the macvim_drawer plugin. Requires macvim_drawer to be installed,
22
+ # regular MacVim will break with this function.
23
+ function e() {
24
+ if [[ -f "./README.md" ]]; then
25
+ mvim README.md
26
+ elif [[ -f "./README.rdoc" ]]; then
27
+ mvim README.rdoc
28
+ else
29
+ mvim
30
+ fi
31
+ }
32
+
33
+ # Set the title of the iTerm window.
34
+ function set_title() {
35
+ print -Pn "\033];$1\007";
36
+ }
37
+
38
+ # Find out what an exit code means.
39
+ function exit_code() {
40
+ cat /usr/include/sysexits.h | grep "$1"
41
+ }
@@ -0,0 +1,18 @@
1
+ # Load the plugin architecture
2
+ source "$ZSH/vendor/antigen.zsh"
3
+
4
+ # Set up the plugin architecture
5
+ antigen-lib
6
+
7
+ # Load plugins
8
+ antigen-bundle tubbo/dots lib/plugins/aws
9
+ antigen-bundle tubbo/dots lib/plugins/bundler
10
+ antigen-bundle cap
11
+ antigen-bundle tubbo/dots lib/plugins/git
12
+ antigen-bundle tubbo/dots lib/plugins/git-flow
13
+ antigen-bundle tubbo/dots lib/plugins/knife
14
+ antigen-bundle tubbo/dots lib/plugins/macvim
15
+ antigen-bundle tubbo/dots lib/plugins/osx
16
+ antigen-bundle tubbo/dots lib/plugins/rails3
17
+ antigen-bundle tubbo/dots lib/plugins/ruby
18
+ antigen-bundle zsh-users/zsh-syntax-highlighting
data/lib/dots.sh ADDED
@@ -0,0 +1,11 @@
1
+ # add a function path
2
+ fpath=($ZSH/lib/dots/functions $ZSH/lib/dots/completion $fpath)
3
+
4
+ # Load and run compinit
5
+ autoload -U compinit
6
+ compinit -i
7
+
8
+ source "$ZSH/lib/dots/functions.zsh"
9
+ source "$ZSH/lib/dots/aliases.zsh"
10
+ source "$ZSH/lib/dots/directories.zsh"
11
+ source "$ZSH/lib/dots/plugins.zsh"
@@ -0,0 +1,20 @@
1
+ #
2
+ # Amazon AWS Dev Tools
3
+ #
4
+
5
+ # Used by all CLI tools produced by Amazon
6
+ export JAVA_HOME="$(/usr/libexec/java_home)"
7
+ export EC2_PRIVATE_KEY="$(/bin/ls "$HOME"/.ec2/pk-*.pem | /usr/bin/head -1)"
8
+ export EC2_CERT="$(/bin/ls "$HOME"/.ec2/cert-*.pem | /usr/bin/head -1)"
9
+
10
+ # ec2-dev-tools
11
+ export EC2_HOME="/usr/local/Library/LinkedKegs/ec2-api-tools/jars"
12
+
13
+ # ec2-ami-tools
14
+ export EC2_AMITOOL_HOME="/usr/local/Library/LinkedKegs/ec2-ami-tools/jars"
15
+
16
+ # aws-sns-cli
17
+ export AWS_SNS_HOME="/usr/local/Library/LinkedKegs/aws-sns-cli/jars"
18
+
19
+ # Further AWS configuration that must be hidden from Git.
20
+ source "$ZSH/config/aws.zsh"
@@ -0,0 +1,82 @@
1
+ #compdef bundle
2
+
3
+ local curcontext="$curcontext" state line _gems _opts ret=1
4
+
5
+ _arguments -C -A "-v" -A "--version" \
6
+ '(- 1 *)'{-v,--version}'[display version information]' \
7
+ '1: :->cmds' \
8
+ '*:: :->args' && ret=0
9
+
10
+ case $state in
11
+ cmds)
12
+ _values "bundle command" \
13
+ "install[Install the gems specified by the Gemfile or Gemfile.lock]" \
14
+ "update[Update dependencies to their latest versions]" \
15
+ "package[Package the .gem files required by your application]" \
16
+ "exec[Execute a script in the context of the current bundle]" \
17
+ "config[Specify and read configuration options for bundler]" \
18
+ "check[Determine whether the requirements for your application are installed]" \
19
+ "list[Show all of the gems in the current bundle]" \
20
+ "show[Show the source location of a particular gem in the bundle]" \
21
+ "console[Start an IRB session in the context of the current bundle]" \
22
+ "open[Open an installed gem in the editor]" \
23
+ "viz[Generate a visual representation of your dependencies]" \
24
+ "init[Generate a simple Gemfile, placed in the current directory]" \
25
+ "gem[Create a simple gem, suitable for development with bundler]" \
26
+ "help[Describe available tasks or one specific task]"
27
+ ret=0
28
+ ;;
29
+ args)
30
+ case $line[1] in
31
+ help)
32
+ _values 'commands' \
33
+ 'install' \
34
+ 'update' \
35
+ 'package' \
36
+ 'exec' \
37
+ 'config' \
38
+ 'check' \
39
+ 'list' \
40
+ 'show' \
41
+ 'console' \
42
+ 'open' \
43
+ 'viz' \
44
+ 'init' \
45
+ 'gem' \
46
+ 'help' && ret=0
47
+ ;;
48
+ install)
49
+ _arguments \
50
+ '(--no-color)--no-color[disable colorization in output]' \
51
+ '(--local)--local[do not attempt to connect to rubygems.org]' \
52
+ '(--quiet)--quiet[only output warnings and errors]' \
53
+ '(--gemfile)--gemfile=-[use the specified gemfile instead of Gemfile]:gemfile' \
54
+ '(--system)--system[install to the system location]' \
55
+ '(--deployment)--deployment[install using defaults tuned for deployment environments]' \
56
+ '(--frozen)--frozen[do not allow the Gemfile.lock to be updated after this install]' \
57
+ '(--path)--path=-[specify a different path than the system default]:path:_files' \
58
+ '(--binstubs)--binstubs=-[generate bin stubs for bundled gems to ./bin]:directory:_files' \
59
+ '(--without)--without=-[exclude gems that are part of the specified named group]:groups'
60
+ ret=0
61
+ ;;
62
+ exec)
63
+ _normal && ret=0
64
+ ;;
65
+ (open|show)
66
+ _gems=( $(bundle show 2> /dev/null | sed -e '/^ \*/!d; s/^ \* \([^ ]*\) .*/\1/') )
67
+ if [[ $_gems != "" ]]; then
68
+ _values 'gems' $_gems && ret=0
69
+ fi
70
+ ;;
71
+ *)
72
+ _opts=( $(bundle help $line[1] | sed -e '/^ \[-/!d; s/^ \[\(-[^=]*\)=.*/\1/') )
73
+ _opts+=( $(bundle help $line[1] | sed -e '/^ -/!d; s/^ \(-.\), \[\(-[^=]*\)=.*/\1 \2/') )
74
+ if [[ $_opts != "" ]]; then
75
+ _values 'options' $_opts && ret=0
76
+ fi
77
+ ;;
78
+ esac
79
+ ;;
80
+ esac
81
+
82
+ return ret
@@ -0,0 +1,7 @@
1
+ ## Aliases
2
+
3
+ alias be="bundle exec"
4
+ alias bi="bundle install"
5
+ alias bl="bundle list"
6
+ alias bp="bundle package"
7
+ alias bu="bundle update"
@@ -0,0 +1,126 @@
1
+ # Aliases
2
+ alias g='git'
3
+ compdef g=git
4
+ alias gst='git status'
5
+ compdef _git gst=git-status
6
+ alias gu='git pull'
7
+ compdef _git gl=git-pull
8
+ alias gur='git pull --rebase'
9
+ compdef _git gl=git-pull
10
+ alias gup='git fetch && git rebase'
11
+ compdef _git gup=git-fetch
12
+ alias gp='git push'
13
+ compdef _git gp=git-push
14
+ alias gpf='git push tubbo'
15
+ compdef _git gpf=git-push
16
+ gdv() { git diff -w "$@" | view - }
17
+ compdef _git gdv=git-diff
18
+ alias gc='git commit -v'
19
+ compdef _git gc=git-commit
20
+ alias gca='git commit -v -a'
21
+ compdef _git gca=git-commit
22
+ alias gco='git checkout'
23
+ compdef _git gco=git-checkout
24
+ alias gcm='git checkout master'
25
+ alias gb='git branch'
26
+ compdef _git gb=git-branch
27
+ alias gba='git branch -a'
28
+ compdef _git gba=git-branch
29
+ alias gcount='git shortlog -sn'
30
+ compdef gcount=git
31
+ alias gcp='git cherry-pick'
32
+ compdef _git gcp=git-cherry-pick
33
+ alias gl='git l'
34
+ compdef _git glg=git-log
35
+ alias gls='git log --stat --max-count=5'
36
+ compdef _git gls=git-log
37
+ alias glg='git log --graph --max-count=5'
38
+ compdef _git glg=git-log
39
+ alias lol='git lol'
40
+ compdef _git lol=git-log
41
+ alias gss='git status -s'
42
+ compdef _git gss=git-status
43
+ alias ga='git add'
44
+ compdef _git ga=git-add
45
+ alias gm='git merge'
46
+ compdef _git gm=git-merge
47
+ alias gls="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative"
48
+ compdef _git gls=git-log
49
+ alias grv='git remote -v'
50
+ compdef _get grv=git-remote
51
+ alias gd='git diff'
52
+ compdef _get grv=git-diff
53
+ alias gg='git grep'
54
+ compdef _get gg=git-grep
55
+ alias gbl='git blame'
56
+ compdef _get gbl=git-blame
57
+ alias gt='git reset'
58
+ compdef _get gt=git-reset
59
+ alias gth='git reset --hard'
60
+ compdef _get gt=git-reset
61
+ alias gts='git reset --soft'
62
+ compdef _get gt=git-reset
63
+ alias gthh='git reset --hard HEAD'
64
+ compdef _get gt=git-reset
65
+ alias gs='git pull --rebase && git push'
66
+ compdef _get gs=git-pull
67
+ compdef _get gs=git-push
68
+ alias gsf='git pull --rebase && git push tubbo'
69
+ compdef _get gs=git-pull
70
+ compdef _get gs=git-push
71
+ alias gy='git synchronize'
72
+ compdef _get gy=git-synchronize
73
+ alias garc='ga . && grc'
74
+ compdef _get garc=git-add
75
+ compdef _get garc=git-rebase
76
+
77
+ # Merging and Rebasing
78
+ alias gr='git rebase'
79
+ compdef _get gg=git-rebase
80
+ alias grc='git rebase --continue'
81
+ compdef _get gg=git-rebase
82
+ alias grs='git rebase --skip'
83
+ compdef _get gg=git-rebase
84
+ alias gra='git rebase --abort'
85
+ compdef _get gg=git-rebase
86
+ alias gri='git rebase --interactive'
87
+ compdef _get gg=git-rebase
88
+ alias gmt='git mergetool'
89
+ compdef _get gmt=git-mergetool
90
+ alias gcf='git clean -f'
91
+ compdef _get gcf=git-clean
92
+
93
+ # Super useful alias aliases
94
+ alias s='gst'
95
+ compdef _get grv=git-status
96
+
97
+ # Git and svn mix
98
+ alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk'
99
+ compdef git-svn-dcommit-push=git
100
+
101
+ alias gsr='git svn rebase'
102
+ alias gsd='git svn dcommit'
103
+ #
104
+ # Will return the current branch name
105
+ # Usage example: git pull origin $(current_branch)
106
+ #
107
+ function current_branch() {
108
+ ref=$(git symbolic-ref HEAD 2> /dev/null) || return
109
+ echo ${ref#refs/heads/}
110
+ }
111
+
112
+ # these aliases take advantage of the previous function
113
+ alias ggpull='git pull origin $(current_branch)'
114
+ compdef ggpull=git
115
+ alias ggpush='git push origin $(current_branch)'
116
+ compdef ggpush=git
117
+ alias ggpnp='git pull origin $(current_branch) && git push origin $(current_branch)'
118
+ compdef ggpnp=git
119
+
120
+ # Wrap git in the hub gem if it's installed
121
+ if (( $+commands[hub] )) ; then
122
+ function git() {hub "$@"}
123
+ fi
124
+
125
+ # SHIP IT
126
+ alias ship='echo ">>> SHIP IT <<<"; git checkout master; git pull --rebase origin master; git merge develop; git push origin master'