commit
65ce765043
14 changed files with 164 additions and 25 deletions
@ -1 +1,2 @@ |
||||
alias brews='brew list -1' |
||||
alias bubu="brew update && brew upgrade && brew cleanup" |
||||
|
||||
@ -0,0 +1,49 @@ |
||||
# Bundler |
||||
|
||||
- adds completion for basic bundler commands |
||||
- adds short aliases for common bundler commands |
||||
- `be` aliased to `bundle exec` |
||||
- `bl` aliased to `bundle list` |
||||
- `bp` aliased to `bundle package` |
||||
- `bo` aliased to `bundle open` |
||||
- `bu` aliased to `bundle update` |
||||
- `bi` aliased to `bundle install --jobs=<cpu core count>` (only for bundler `>= 1.4.0`) |
||||
- adds a wrapper for common gems: |
||||
- looks for a binstub under `./bin/` and executes it (if present) |
||||
- calls `bundle exec <gem executable>` otherwise |
||||
|
||||
For a full list of *common gems* being wrapped by default please look at the `bundler.plugin.zsh` file. |
||||
|
||||
## Configuration |
||||
|
||||
Please use the exact name of the executable and not the gem name. |
||||
|
||||
### Add additional gems to be wrapped |
||||
|
||||
Add this before the plugin-list in your `.zshrc`: |
||||
```sh |
||||
BUNDLED_COMMANDS=(rubocop) |
||||
plugins=(... bundler ...) |
||||
``` |
||||
This will add the wrapper for the `rubocop` gem (i.e. the executable). |
||||
|
||||
|
||||
### Exclude gems from being wrapped |
||||
|
||||
Add this before the plugin-list in your `.zshrc`: |
||||
```sh |
||||
UNBUNDLED_COMMANDS=(foreman spin) |
||||
plugins=(... bundler ...) |
||||
``` |
||||
This will exclude the `foreman` and `spin` gems (i.e. their executable) from being wrapped. |
||||
|
||||
## Excluded gems |
||||
|
||||
These gems should not be called with `bundle exec`. Please see the Issues on GitHub for clarification. |
||||
|
||||
`berks` |
||||
`foreman` |
||||
`mailcatcher` |
||||
`rails` |
||||
`ruby` |
||||
`spin` |
||||
@ -1,6 +1,8 @@ |
||||
# Aliases to stop, start and restart Postgres |
||||
# Paths noted below are for Postgress installed via Homebrew on OSX |
||||
# Aliases to control Postgres |
||||
# Paths noted below are for Postgres installed via Homebrew on OSX |
||||
|
||||
alias startpost='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start' |
||||
alias stoppost='pg_ctl -D /usr/local/var/postgres stop -s -m fast' |
||||
alias restartpost='stoppost && sleep 1 && startpost' |
||||
alias restartpost='stoppost && sleep 1 && startpost' |
||||
alias reloadpost='pg_ctl reload -D /usr/local/var/postgres -s' |
||||
alias statuspost='pg_ctl status -D /usr/local/var/postgres -s' |
||||
@ -1,22 +1,23 @@ |
||||
# Symfony2 basic command completion |
||||
|
||||
_symfony2_get_command_list () { |
||||
php app/console --no-ansi | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }' |
||||
php $(find . -maxdepth 2 -mindepth 1 -name 'console') --no-ansi | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }' |
||||
} |
||||
|
||||
_symfony2 () { |
||||
if [ -f app/console ]; then |
||||
if [ -f $(find . -maxdepth 2 -mindepth 1 -name 'console') ]; then |
||||
compadd `_symfony2_get_command_list` |
||||
fi |
||||
} |
||||
|
||||
compdef _symfony2 app/console |
||||
compdef _symfony2 $(find . -maxdepth 2 -mindepth 1 -name 'console') |
||||
compdef _symfony2 sf |
||||
|
||||
#Alias |
||||
alias sf='php app/console' |
||||
alias sfcl='php app/console cache:clear' |
||||
alias sfroute='php app/console router:debug' |
||||
alias sfcontainer='php app/console container:debug' |
||||
alias sfgb='php app/console generate:bundle' |
||||
alias sf='php $(find . -maxdepth 2 -mindepth 1 -name 'console') ' |
||||
alias sfcl='php $(find . -maxdepth 2 -mindepth 1 -name 'console') cache:clear' |
||||
alias sfcw='php $(find . -maxdepth 2 -mindepth 1 -name 'console') cache:warmup' |
||||
alias sfroute='php $(find . -maxdepth 2 -mindepth 1 -name 'console') router:debug' |
||||
alias sfcontainer='php $(find . -maxdepth 2 -mindepth 1 -name 'console') container:debug' |
||||
alias sfgb='php $(find . -maxdepth 2 -mindepth 1 -name 'console') generate:bundle' |
||||
|
||||
|
||||
Loading…
Reference in new issue