diff options
-rw-r--r-- | .gitignore | 11 | ||||
-rw-r--r-- | LICENSE.txt (renamed from MIT-LICENSE.txt) | 0 | ||||
-rw-r--r-- | README.md (renamed from README.markdown) | 2 | ||||
-rw-r--r-- | cache/.easter-egg | 4 | ||||
-rw-r--r-- | cache/.gitkeep | 0 | ||||
-rw-r--r-- | custom/example.zsh | 13 | ||||
-rw-r--r-- | lib/theme-and-appearance.zsh | 8 | ||||
-rw-r--r-- | log/.easter-egg | 4 | ||||
-rw-r--r-- | log/.gitkeep | 0 | ||||
-rw-r--r-- | plugins/fossil/README.md | 7 | ||||
-rw-r--r-- | plugins/fossil/fossil.plugin.zsh | 89 | ||||
-rw-r--r-- | plugins/git/git.plugin.zsh | 5 | ||||
-rw-r--r-- | plugins/meteor/README.md | 45 | ||||
-rw-r--r-- | plugins/meteor/meteor.plugin.zsh | 33 | ||||
-rw-r--r-- | plugins/mvn/README.md | 32 | ||||
-rw-r--r-- | plugins/mvn/mvn.plugin.zsh | 2 | ||||
-rw-r--r-- | plugins/osx/osx.plugin.zsh | 36 | ||||
-rw-r--r-- | plugins/symfony2/symfony2.plugin.zsh | 4 | ||||
-rw-r--r-- | plugins/vagrant/_vagrant | 1 | ||||
-rw-r--r-- | plugins/wp-cli/README.md | 4 | ||||
-rw-r--r-- | themes/avit.zsh-theme | 2 |
21 files changed, 273 insertions, 29 deletions
diff --git a/.gitignore b/.gitignore index 8fa66f02f..b2022081a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,8 @@ -locals.zsh -log/.zsh_history -projects.zsh -custom +# custom files +custom/ !custom/plugins/example !custom/example.zsh -*.swp -!custom/example.zshcache + +# temp files directories cache/ +log/ diff --git a/MIT-LICENSE.txt b/LICENSE.txt index 42f607f5d..42f607f5d 100644 --- a/MIT-LICENSE.txt +++ b/LICENSE.txt diff --git a/README.markdown b/README.md index 0cbea72c9..5f152e4df 100644 --- a/README.markdown +++ b/README.md @@ -210,4 +210,4 @@ We have [stickers](http://shop.planetargon.com/products/ohmyzsh-stickers-set-of- ## License -Oh My Zsh is released under the [MIT license](MIT-LICENSE.txt). +Oh My Zsh is released under the [MIT license](LICENSE.txt). diff --git a/cache/.easter-egg b/cache/.easter-egg deleted file mode 100644 index 4b6164edb..000000000 --- a/cache/.easter-egg +++ /dev/null @@ -1,4 +0,0 @@ -This file is only here so that Git will keep a cache directory as .gitignore is ignoring all the files within it. - -Feel free to add love notes for people here. - diff --git a/cache/.gitkeep b/cache/.gitkeep new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/cache/.gitkeep diff --git a/custom/example.zsh b/custom/example.zsh index 28ffcae25..c505a9673 100644 --- a/custom/example.zsh +++ b/custom/example.zsh @@ -1,5 +1,10 @@ -# Add yourself some shortcuts to projects you often work on -# Example: +# You can put files here to add functionality separated per file, which +# will be ignored by git. +# Files on the custom/ directory will be automatically loaded by the init +# script, in alphabetical order. + +# For example: add yourself some shortcuts to projects you often work on. +# +# brainstormr=~/Projects/development/planetargon/brainstormr +# cd $brainstormr # -# brainstormr=/Users/robbyrussell/Projects/development/planetargon/brainstormr -#
\ No newline at end of file diff --git a/lib/theme-and-appearance.zsh b/lib/theme-and-appearance.zsh index ebb11fb31..5c5bb0e6d 100644 --- a/lib/theme-and-appearance.zsh +++ b/lib/theme-and-appearance.zsh @@ -11,9 +11,9 @@ then # otherwise, leave ls as is, because NetBSD's ls doesn't support -G gls --color -d . &>/dev/null 2>&1 && alias ls='gls --color=tty' elif [[ "$(uname -s)" == "OpenBSD" ]]; then - # On OpenBSD, "gls" (ls from GNU coreutils) and "colorls" (ls from base, - # with color and multibyte support) are available from ports. "colorls" - # will be installed on purpose and can't be pulled in by installing + # On OpenBSD, "gls" (ls from GNU coreutils) and "colorls" (ls from base, + # with color and multibyte support) are available from ports. "colorls" + # will be installed on purpose and can't be pulled in by installing # coreutils, so prefer it to "gls". gls --color -d . &>/dev/null 2>&1 && alias ls='gls --color=tty' colorls -G -d . &>/dev/null 2>&1 && alias ls='colorls -G' @@ -22,10 +22,8 @@ then fi fi -#setopt no_beep setopt auto_cd setopt multios -setopt cdablevars if [[ x$WINDOW != x ]] then diff --git a/log/.easter-egg b/log/.easter-egg deleted file mode 100644 index 2533149e2..000000000 --- a/log/.easter-egg +++ /dev/null @@ -1,4 +0,0 @@ -This file is only here so that Git will keep a log directory as .gitignore is ignoring all the log files within it. - -feel free to add love notes for people here. - diff --git a/log/.gitkeep b/log/.gitkeep new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/log/.gitkeep diff --git a/plugins/fossil/README.md b/plugins/fossil/README.md new file mode 100644 index 000000000..5bb47b7d5 --- /dev/null +++ b/plugins/fossil/README.md @@ -0,0 +1,7 @@ +## Fossil Plugin + +This plugin adds completion support and prompt for fossil repositories. +The prompt will display the current branch and status been dirty or clean. + +### CONTRIBUTOR + - Jefferson González ([jgmdev](https://github.com/jgmdev)) diff --git a/plugins/fossil/fossil.plugin.zsh b/plugins/fossil/fossil.plugin.zsh new file mode 100644 index 000000000..1ae166e62 --- /dev/null +++ b/plugins/fossil/fossil.plugin.zsh @@ -0,0 +1,89 @@ +_FOSSIL_PROMPT="" + +# Prefix at the very beginning of the prompt, before the branch name +ZSH_THEME_FOSSIL_PROMPT_PREFIX="%{$fg_bold[blue]%}fossil:(%{$fg_bold[red]%}" + +# At the very end of the prompt +ZSH_THEME_FOSSIL_PROMPT_SUFFIX="%{$fg_bold[blue]%})" + +# Text to display if the branch is dirty +ZSH_THEME_FOSSIL_PROMPT_DIRTY=" %{$fg_bold[red]%}✖" + +# Text to display if the branch is clean +ZSH_THEME_FOSSIL_PROMPT_CLEAN=" %{$fg_bold[green]%}✔" + +function fossil_prompt_info () { + local _OUTPUT=`fossil branch 2>&1` + local _STATUS=`echo $_OUTPUT | grep "use --repo"` + if [ "$_STATUS" = "" ]; then + local _EDITED=`fossil changes` + local _EDITED_SYM="$ZSH_THEME_FOSSIL_PROMPT_CLEAN" + local _BRANCH=`echo $_OUTPUT | grep "* " | sed 's/* //g'` + + if [ "$_EDITED" != "" ]; then + _EDITED_SYM="$ZSH_THEME_FOSSIL_PROMPT_DIRTY" + fi + + echo "$ZSH_THEME_FOSSIL_PROMPT_PREFIX" \ + "$_BRANCH" \ + "$ZSH_THEME_FOSSIL_PROMPT_SUFFIX" \ + "$_EDITED_SYM"\ + "%{$reset_color%}" + fi +} + +function _fossil_get_command_list () { + fossil help -a | grep -v "Usage|Common|This is" +} + +function _fossil () { + local context state state_descr line + typeset -A opt_args + + _arguments \ + '1: :->command'\ + '2: :->subcommand' + + case $state in + command) + local _OUTPUT=`fossil branch 2>&1 | grep "use --repo"` + if [ "$_OUTPUT" = "" ]; then + compadd `_fossil_get_command_list` + else + compadd clone init import help version + fi + ;; + subcommand) + if [ "$words[2]" = "help" ]; then + compadd `_fossil_get_command_list` + else + compcall -D + fi + ;; + esac +} + +function _fossil_prompt () { + local current=`echo $PROMPT $RPROMPT | grep fossil` + + if [ "$_FOSSIL_PROMPT" = "" -o "$current" = "" ]; then + local _prompt=${PROMPT} + local _rprompt=${RPROMPT} + + local is_prompt=`echo $PROMPT | grep git` + + if [ "$is_prompt" = "" ]; then + export RPROMPT="$_rprompt"'$(fossil_prompt_info)' + else + export PROMPT="$_prompt"'$(fossil_prompt_info) ' + fi + + _FOSSIL_PROMPT="1" + fi +} + +compdef _fossil fossil + +autoload -U add-zsh-hook + +add-zsh-hook precmd _fossil_prompt diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 95ce1ae26..34f69029a 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -58,9 +58,11 @@ alias gbss='git bisect start' alias gc='git commit -v' alias gc!='git commit -v --amend' +alias gcn!='git commit -v --no-edit --amend' alias gca='git commit -v -a' alias gca!='git commit -v -a --amend' -alias gcan!='git commit -v -a -s --no-edit --amend' +alias gcan!='git commit -v -a --no-edit --amend' +alias gcans!='git commit -v -a -s --no-edit --amend' alias gcam='git commit -a -m' alias gcb='git checkout -b' alias gcf='git config --list' @@ -155,6 +157,7 @@ alias glo='git log --oneline --decorate' alias glol="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" alias glola="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --all" alias glog='git log --oneline --decorate --graph' +alias gloga='git log --oneline --decorate --graph --all' alias glp="_git_log_prettily" compdef _git glp=git-log diff --git a/plugins/meteor/README.md b/plugins/meteor/README.md new file mode 100644 index 000000000..4bee87f8f --- /dev/null +++ b/plugins/meteor/README.md @@ -0,0 +1,45 @@ +## Introduction + +The [meteor plugin](https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/meteor) provides many +[useful aliases](#aliases) as well as completion for the `meteor` command. + +Enable it by adding `meteor` to the plugins array in your zshrc file: +```zsh +plugins=(... meteor) +``` + +## Aliases + +| Alias | Command | Description | +|---------|----------------------------|------------------------------------------------------------------| +| `ma` | `meteor add` | Add a package to this project | +| `map` | `meteor add-platform` | Add a platform to this project | +| `mad` | `meteor admin` | Administrative commands | +| `mau` | `meteor authorized` | View or change authorized users and organizations for a site | +| `mb` | `meteor build` | Build this project for all platforms | +| `mcl` | `meteor claim` | Claim a site deployed with an old Meteor version | +| `mca` | `meteor configure-android` | Run the Android configuration tool from Meteor's ADK environment | +| `mc` | `meteor create` | Create a new project | +| `mdb` | `meteor debug` | Run the project, but suspend the server process for debugging | +| `mde` | `meteor deploy` | Deploy this project to Meteor | +| `mis` | `meteor install-sdk` | Installs SDKs for a platform | +| `ml` | `meteor list` | List the packages explicitly used by your project | +| `mlp` | `meteor list-platforms` | List the platforms added to your project | +| `mls` | `meteor list-sites` | List sites for which you are authorized | +| `mli` | `meteor login` | Log in to your Meteor developer account | +| `mlo` | `meteor logout` | Log out of your Meteor developer account | +| `mlog` | `meteor logs` | Show logs for specified site | +| `mm` | `meteor mongo` | Connect to the Mongo database for the specified site | +| `mp` | `meteor publish` | Publish a new version of a package to the package server | +| `mpa` | `meteor publish-for-arch` | Builds an already-published package for a new platform | +| `mpr` | `meteor publish-release` | Publish a new meteor release to the package server | +| `mr` | `meteor remove` | Remove a package from this project | +| `mrp` | `meteor remove-platform` | Remove a platform from this project | +| `mre` | `meteor reset` | Reset the project state. Erases the local database | +| `m` | `meteor run` | **[default]** Run this project in local development mode | +| `ms` | `meteor search` | Search through the package server database | +| `msh` | `meteor shell` | Launch a Node REPL for interactively evaluating server-side code | +| `msw` | `meteor show` | Show detailed information about a release or package | +| `mt` | `meteor test-packages` | Test one or more packages | +| `mu` | `meteor update` | Upgrade this project's dependencies to their latest versions | +| `mw` | `meteor whoami` | Prints the username of your Meteor developer account | diff --git a/plugins/meteor/meteor.plugin.zsh b/plugins/meteor/meteor.plugin.zsh new file mode 100644 index 000000000..db55e367d --- /dev/null +++ b/plugins/meteor/meteor.plugin.zsh @@ -0,0 +1,33 @@ +# Aliases in alphabetical order + +alias ma='meteor add' # Add a package to this project. +alias map='meteor add-platform' # Add a platform to this project. +alias mad='meteor admin' # Administrative commands. +alias mau='meteor authorized' # View or change authorized users and organizations for a site. +alias mb='meteor build' # Build this project for all platforms. +alias mcl='meteor claim' # Claim a site deployed with an old Meteor version. +alias mca='meteor configure-android' # Run the Android configuration tool from Meteor's ADK environment. +alias mc='meteor create' # Create a new project. +alias mdb='meteor debug' # Run the project, but suspend the server process for debugging. +alias mde='meteor deploy' # Deploy this project to Meteor. +alias mis='meteor install-sdk' # Installs SDKs for a platform. +alias ml='meteor list' # List the packages explicitly used by your project. +alias mlp='meteor list-platforms' # List the platforms added to your project. +alias mls='meteor list-sites' # List sites for which you are authorized. +alias mli='meteor login' # Log in to your Meteor developer account. +alias mlo='meteor logout' # Log out of your Meteor developer account. +alias mlog='meteor logs' # Show logs for specified site. +alias mm='meteor mongo' # Connect to the Mongo database for the specified site. +alias mp='meteor publish' # Publish a new version of a package to the package server. +alias mpa='meteor publish-for-arch' # Builds an already-published package for a new platform. +alias mpr='meteor publish-release' # Publish a new meteor release to the package server. +alias mr='meteor remove' # Remove a package from this project. +alias mrp='meteor remove-platform' # Remove a platform from this project. +alias mre='meteor reset' # Reset the project state. Erases the local database. +alias m='meteor run' # [default] Run this project in local development mode. +alias ms='meteor search' # Search through the package server database. +alias msh='meteor shell' # Launch a Node REPL for interactively evaluating server-side code. +alias msw='meteor show' # Show detailed information about a release or package. +alias mt='meteor test-packages' # Test one or more packages. +alias mu='meteor update' # Upgrade this project's dependencies to their latest versions. +alias mw='meteor whoami' # Prints the username of your Meteor developer account. diff --git a/plugins/mvn/README.md b/plugins/mvn/README.md new file mode 100644 index 000000000..79192bb54 --- /dev/null +++ b/plugins/mvn/README.md @@ -0,0 +1,32 @@ +## Introduction + +The [mvn plugin](https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/mvn) provides many +[useful aliases](#aliases) as well as completion for the `mvn` command. + +Enable it by adding `mvn` to the plugins array in your zshrc file: +```zsh +plugins=(... mvn) +``` + +## Aliases + +| Alias | Command | +|:---------------------|:------------------------------------------------| +| `mvncie` | `mvn clean install eclipse:eclipse` | +| `mvnci` | `mvn clean install` | +| `mvncist` | `mvn clean install -DskipTests` | +| `mvne` | `mvn eclipse:eclipse` | +| `mvnd` | `mvn deploy` | +| `mvnp` | `mvn package` | +| `mvnc` | `mvn clean` | +| `mvncom` | `mvn compile` | +| `mvnct` | `mvn clean test` | +| `mvnt` | `mvn test` | +| `mvnag` | `mvn archetype:generate` | +| `mvn-updates` | `mvn versions:display-dependency-updates` | +| `mvntc7` | `mvn tomcat7:run` | +| `mvnjetty` | `mvn jetty:run` | +| `mvndt` | `mvn dependency:tree` | +| `mvns` | `mvn site` | +| `mvnsrc` | `mvn dependency:sources` | +| `mvndocs` | `mvn dependency:resolve -Dclassifier=javadoc` | diff --git a/plugins/mvn/mvn.plugin.zsh b/plugins/mvn/mvn.plugin.zsh index 8324c495b..7aaab0e18 100644 --- a/plugins/mvn/mvn.plugin.zsh +++ b/plugins/mvn/mvn.plugin.zsh @@ -171,7 +171,7 @@ function listMavenCompletions { gwt:browser gwt:clean gwt:compile gwt:compile-report gwt:css gwt:debug gwt:eclipse gwt:eclipseTest gwt:generateAsync gwt:help gwt:i18n gwt:mergewebxml gwt:resources gwt:run gwt:sdkInstall gwt:source-jar gwt:soyc gwt:test # options - -Dmaven.test.skip=true -DskipTests -Dmaven.surefire.debug -DenableCiProfile -Dpmd.skip=true -Dcheckstyle.skip=true -Dtycho.mode=maven + -Dmaven.test.skip=true -DskipTests -Dmaven.surefire.debug -DenableCiProfile -Dpmd.skip=true -Dcheckstyle.skip=true -Dtycho.mode=maven -Dmaven.test.failure.ignore=true # arguments -am -amd -B -C -c -cpu -D -e -emp -ep -f -fae -ff -fn -gs -h -l -N -npr -npu -nsu -o -P -pl -q -rf -s -T -t -U -up -V -v -X diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index a1516dcce..c92b6556d 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -46,6 +46,16 @@ EOF end tell EOF + elif [[ "$the_app" == 'iTerm2' ]]; then + osascript <<EOF + tell application "iTerm" + tell current window + create tab with default profile + tell current session to write text "${command}" + end tell + end tell +EOF + else echo "tab: unsupported terminal app: $the_app" false @@ -73,6 +83,19 @@ function vsplit_tab() { end tell EOF + elif [[ "$the_app" == 'iTerm2' ]]; then + osascript <<EOF + tell application "iTerm" + tell current session of first window + set newSession to (split vertically with same profile) + tell newSession + write text "${command}" + select + end tell + end tell + end tell +EOF + else echo "$0: unsupported terminal app: $the_app" >&2 false @@ -100,6 +123,19 @@ function split_tab() { end tell EOF + elif [[ "$the_app" == 'iTerm2' ]]; then + osascript <<EOF + tell application "iTerm" + tell current session of first window + set newSession to (split horizontally with same profile) + tell newSession + write text "${command}" + select + end tell + end tell + end tell +EOF + else echo "$0: unsupported terminal app: $the_app" >&2 false diff --git a/plugins/symfony2/symfony2.plugin.zsh b/plugins/symfony2/symfony2.plugin.zsh index fe236a298..c2a1affad 100644 --- a/plugins/symfony2/symfony2.plugin.zsh +++ b/plugins/symfony2/symfony2.plugin.zsh @@ -22,8 +22,8 @@ alias sf='`_symfony_console`' alias sfcl='sf cache:clear' alias sfsr='sf server:run -vvv' alias sfcw='sf cache:warmup' -alias sfroute='sf router:debug' -alias sfcontainer='sf container:debug' +alias sfroute='sf debug:router' +alias sfcontainer='sf debug:container' alias sfgb='sf generate:bundle' alias sfdev='sf --env=dev' alias sfprod='sf --env=prod' diff --git a/plugins/vagrant/_vagrant b/plugins/vagrant/_vagrant index 764f89545..35377bd9d 100644 --- a/plugins/vagrant/_vagrant +++ b/plugins/vagrant/_vagrant @@ -26,6 +26,7 @@ _1st_arguments=( 'rsync:Syncs rsync synced folders to remote machine' 'rsync-auto:Syncs rsync synced folders automatically when files change' 'share:Shares your Vagrant environment with anyone in the world' + 'snapshot:Manage snapshots with the guest machine' 'ssh:SSH into the currently running environment' 'ssh-config:Outputs .ssh/config valid syntax for connecting to this environment via ssh' 'status:Shows the status of the current Vagrant environment' diff --git a/plugins/wp-cli/README.md b/plugins/wp-cli/README.md index 1a79d60fc..da398ed1a 100644 --- a/plugins/wp-cli/README.md +++ b/plugins/wp-cli/README.md @@ -4,7 +4,9 @@ WordPress Command Line Interface (http://wp-cli.org/) -WP-CLI is a set of command-line tools for managing WordPress installations. You can update plugins, set up multisite installs and much more, without using a web browser. +WP-CLI is a set of command-line tools for managing WordPress installations. You can update plugins, set up multisite installs and much more, without using a web browser. + +This plugin adds [tab completion](http://wp-cli.org/#complete) for `wp-cli` as well as several aliases. ## List of Aliases diff --git a/themes/avit.zsh-theme b/themes/avit.zsh-theme index 87d5be30a..4f0dcbcc6 100644 --- a/themes/avit.zsh-theme +++ b/themes/avit.zsh-theme @@ -41,6 +41,8 @@ function _vi_status() { function _ruby_version() { if {echo $fpath | grep -q "plugins/rvm"}; then echo "%{$fg[grey]%}$(rvm_prompt_info)%{$reset_color%}" + elif {echo $fpath | grep -q "plugins/rbenv"}; then + echo "%{$fg[grey]%}$(rbenv_prompt_info)%{$reset_color%}" fi } |