mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-20 03:02:29 +01:00
merge
This commit is contained in:
commit
e9f58a7d2f
53 changed files with 497 additions and 88 deletions
|
|
@ -7,25 +7,26 @@ bq. "OH MY ZSHELL!"
|
||||||
h2. Setup
|
h2. Setup
|
||||||
|
|
||||||
@oh-my-zsh@ should work with any recent release of "zsh":http://www.zsh.org/, the minimum recommended version is 4.3.9.
|
@oh-my-zsh@ should work with any recent release of "zsh":http://www.zsh.org/, the minimum recommended version is 4.3.9.
|
||||||
|
If not already, install zsh using the command line first.
|
||||||
|
|
||||||
h3. The automatic installer... (do you trust me?)
|
h3. The automatic installer... (do you trust me?)
|
||||||
|
|
||||||
You can install this via the command line with either `curl` or `wget`.
|
You can install this via the command line with either @curl@ or @wget@.
|
||||||
|
|
||||||
h4. via `curl`
|
h4. via @curl@
|
||||||
|
|
||||||
@curl -L http://install.ohmyz.sh | sh@
|
@curl -L http://install.ohmyz.sh | sh@
|
||||||
|
|
||||||
h4. via `wget`
|
h4. via @wget@
|
||||||
|
|
||||||
@wget --no-check-certificate http://install.ohmyz.sh -O - | sh@
|
@wget --no-check-certificate http://install.ohmyz.sh -O - | sh@
|
||||||
|
|
||||||
h4. Optional: change the install directory
|
h4. Optional: change the install directory
|
||||||
|
|
||||||
The default location is `~/.oh-my-zsh` (hidden in your home directory).
|
The default location is @~/.oh-my-zsh@ (hidden in your home directory).
|
||||||
|
|
||||||
You can change the install directory with the ZSH environment variable, either
|
You can change the install directory with the ZSH environment variable, either
|
||||||
by running `export ZSH=/your/path` before installing, or setting it before the
|
by running @export ZSH=/your/path@ before installing, or setting it before the
|
||||||
end of the install pipeline like this:
|
end of the install pipeline like this:
|
||||||
|
|
||||||
@curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | ZSH=~/.dotfiles/zsh sh@
|
@curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | ZSH=~/.dotfiles/zsh sh@
|
||||||
|
|
@ -37,7 +38,7 @@ h3. The manual way
|
||||||
|
|
||||||
@git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh@
|
@git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh@
|
||||||
|
|
||||||
2. *OPTIONAL* Backup your existing ~/.zshrc file
|
2. *OPTIONAL* Backup your existing @~/.zshrc@ file
|
||||||
|
|
||||||
@cp ~/.zshrc ~/.zshrc.orig@
|
@cp ~/.zshrc ~/.zshrc.orig@
|
||||||
|
|
||||||
|
|
@ -53,9 +54,9 @@ h3. The manual way
|
||||||
|
|
||||||
h3. Problems?
|
h3. Problems?
|
||||||
|
|
||||||
You _might_ need to modify your PATH in ~/.zshrc if you're not able to find some commands after switching to _Oh My Zsh_.
|
You _might_ need to modify your @PATH@ in @~/.zshrc@ if you're not able to find some commands after switching to _Oh My Zsh_.
|
||||||
|
|
||||||
If you installed manually or changed the install location, check ZSH in ~/.zshrc
|
If you installed manually or changed the install location, check ZSH in @~/.zshrc@
|
||||||
|
|
||||||
h2. Usage
|
h2. Usage
|
||||||
|
|
||||||
|
|
@ -72,16 +73,16 @@ the "refcard":http://www.bash2zsh.com/zsh_refcard/refcard.pdf is pretty tasty fo
|
||||||
h3. Customization
|
h3. Customization
|
||||||
|
|
||||||
If you want to override any of the default behavior, just add a new file (ending in @.zsh@) into the @custom/@ directory.
|
If you want to override any of the default behavior, just add a new file (ending in @.zsh@) into the @custom/@ directory.
|
||||||
If you have many functions which go well together you can put them as a *.plugin.zsh file in the @custom/plugins/@ directory and then enable this plugin.
|
If you have many functions which go well together you can put them as a @*.plugin.zsh@ file in the @custom/plugins/@ directory and then enable this plugin.
|
||||||
If you would like to override the functionality of a plugin distributed with oh-my-zsh, create a plugin of the same name in the @custom/plugins/@ directory and it will be loaded instead of the one in @plugins/@.
|
If you would like to override the functionality of a plugin distributed with oh-my-zsh, create a plugin of the same name in the @custom/plugins/@ directory and it will be loaded instead of the one in @plugins/@.
|
||||||
|
|
||||||
h3. Updates
|
h3. Updates
|
||||||
|
|
||||||
By default you will be prompted to check for updates. If you would like oh-my-zsh to automatically update itself without prompting you, set the following in your ~/.zshrc
|
By default you will be prompted to check for updates. If you would like oh-my-zsh to automatically update itself without prompting you, set the following in your @~/.zshrc@
|
||||||
|
|
||||||
@DISABLE_UPDATE_PROMPT=true@
|
@DISABLE_UPDATE_PROMPT=true@
|
||||||
|
|
||||||
To disable updates entirely, put this in your ~/.zshrc
|
To disable updates entirely, put this in your @~/.zshrc@
|
||||||
|
|
||||||
@DISABLE_AUTO_UPDATE=true@
|
@DISABLE_AUTO_UPDATE=true@
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ zstyle ':completion:*:*:*:users' ignored-patterns \
|
||||||
named netdump news nfsnobody nobody nscd ntp nut nx obsrun openvpn \
|
named netdump news nfsnobody nobody nscd ntp nut nx obsrun openvpn \
|
||||||
operator pcap polkitd postfix postgres privoxy pulse pvm quagga radvd \
|
operator pcap polkitd postfix postgres privoxy pulse pvm quagga radvd \
|
||||||
rpc rpcuser rpm rtkit scard shutdown squid sshd statd svn sync tftp \
|
rpc rpcuser rpm rtkit scard shutdown squid sshd statd svn sync tftp \
|
||||||
usbmux uucp vcsa wwwrun xfs
|
usbmux uucp vcsa wwwrun xfs '_*'
|
||||||
|
|
||||||
# ... unless we really want to.
|
# ... unless we really want to.
|
||||||
zstyle '*' single-ignored show
|
zstyle '*' single-ignored show
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
alias man='nocorrect man'
|
|
||||||
alias mv='nocorrect mv'
|
|
||||||
alias mysql='nocorrect mysql'
|
|
||||||
alias mkdir='nocorrect mkdir'
|
|
||||||
alias gist='nocorrect gist'
|
|
||||||
alias heroku='nocorrect heroku'
|
|
||||||
alias ebuild='nocorrect ebuild'
|
|
||||||
alias hpodder='nocorrect hpodder'
|
|
||||||
alias sudo='nocorrect sudo'
|
|
||||||
|
|
||||||
if [[ "$ENABLE_CORRECTION" == "true" ]]; then
|
if [[ "$ENABLE_CORRECTION" == "true" ]]; then
|
||||||
|
alias ebuild='nocorrect ebuild'
|
||||||
|
alias gist='nocorrect gist'
|
||||||
|
alias heroku='nocorrect heroku'
|
||||||
|
alias hpodder='nocorrect hpodder'
|
||||||
|
alias man='nocorrect man'
|
||||||
|
alias mkdir='nocorrect mkdir'
|
||||||
|
alias mv='nocorrect mv'
|
||||||
|
alias mysql='nocorrect mysql'
|
||||||
|
alias sudo='nocorrect sudo'
|
||||||
|
|
||||||
setopt correct_all
|
setopt correct_all
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
14
lib/git.zsh
14
lib/git.zsh
|
|
@ -1,8 +1,8 @@
|
||||||
# get the name of the branch we are on
|
# get the name of the branch we are on
|
||||||
function git_prompt_info() {
|
function git_prompt_info() {
|
||||||
if [[ "$(git config --get oh-my-zsh.hide-status)" != "1" ]]; then
|
if [[ "$(command git config --get oh-my-zsh.hide-status 2>/dev/null)" != "1" ]]; then
|
||||||
ref=$(command git symbolic-ref HEAD 2> /dev/null) || \
|
ref=$(command git symbolic-ref HEAD 2> /dev/null) || \
|
||||||
ref=$(command git rev-parse --short HEAD 2> /dev/null) || return
|
ref=$(command git rev-parse --short HEAD 2> /dev/null) || return 0
|
||||||
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
@ -54,11 +54,19 @@ git_remote_status() {
|
||||||
|
|
||||||
# Checks if there are commits ahead from remote
|
# Checks if there are commits ahead from remote
|
||||||
function git_prompt_ahead() {
|
function git_prompt_ahead() {
|
||||||
if $(echo "$(command git log origin/$(current_branch)..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then
|
if $(echo "$(command git log @{upstream}..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then
|
||||||
echo "$ZSH_THEME_GIT_PROMPT_AHEAD"
|
echo "$ZSH_THEME_GIT_PROMPT_AHEAD"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Gets the number of commits ahead from remote
|
||||||
|
function git_commits_ahead() {
|
||||||
|
if $(echo "$(command git log @{upstream}..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then
|
||||||
|
COMMITS=$(command git log @{upstream}..HEAD | grep '^commit' | wc -l | tr -d ' ')
|
||||||
|
echo "$ZSH_THEME_GIT_COMMITS_AHEAD_PREFIX$COMMITS$ZSH_THEME_GIT_COMMITS_AHEAD_SUFFIX"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Formats prompt string for current git commit short SHA
|
# Formats prompt string for current git commit short SHA
|
||||||
function git_prompt_short_sha() {
|
function git_prompt_short_sha() {
|
||||||
SHA=$(command git rev-parse --short HEAD 2> /dev/null) && echo "$ZSH_THEME_GIT_PROMPT_SHA_BEFORE$SHA$ZSH_THEME_GIT_PROMPT_SHA_AFTER"
|
SHA=$(command git rev-parse --short HEAD 2> /dev/null) && echo "$ZSH_THEME_GIT_PROMPT_SHA_BEFORE$SHA$ZSH_THEME_GIT_PROMPT_SHA_AFTER"
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,9 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Save the location of the current completion dump file.
|
# Save the location of the current completion dump file.
|
||||||
ZSH_COMPDUMP="${ZDOTDIR:-${HOME}}/.zcompdump-${SHORT_HOST}-${ZSH_VERSION}"
|
if [ -z "$ZSH_COMPDUMP" ]; then
|
||||||
|
ZSH_COMPDUMP="${ZDOTDIR:-${HOME}}/.zcompdump-${SHORT_HOST}-${ZSH_VERSION}"
|
||||||
|
fi
|
||||||
|
|
||||||
# Load and run compinit
|
# Load and run compinit
|
||||||
autoload -U compinit
|
autoload -U compinit
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
if [ $commands[autojump] ]; then # check if autojump is installed
|
if [ $commands[autojump] ]; then # check if autojump is installed
|
||||||
if [ -f /usr/share/autojump/autojump.zsh ]; then # debian and ubuntu package
|
if [ -f $HOME/.autojump/etc/profile.d/autojump.zsh ]; then # manual user-local installation
|
||||||
|
. $HOME/.autojump/etc/profile.d/autojump.zsh
|
||||||
|
elif [ -f /usr/share/autojump/autojump.zsh ]; then # debian and ubuntu package
|
||||||
. /usr/share/autojump/autojump.zsh
|
. /usr/share/autojump/autojump.zsh
|
||||||
elif [ -f /etc/profile.d/autojump.zsh ]; then # manual installation
|
elif [ -f /etc/profile.d/autojump.zsh ]; then # manual installation
|
||||||
. /etc/profile.d/autojump.zsh
|
. /etc/profile.d/autojump.zsh
|
||||||
|
|
@ -7,8 +9,6 @@ if [ $commands[autojump] ]; then # check if autojump is installed
|
||||||
. /etc/profile.d/autojump.sh
|
. /etc/profile.d/autojump.sh
|
||||||
elif [ -f /usr/local/share/autojump/autojump.zsh ]; then # freebsd installation
|
elif [ -f /usr/local/share/autojump/autojump.zsh ]; then # freebsd installation
|
||||||
. /usr/local/share/autojump/autojump.zsh
|
. /usr/local/share/autojump/autojump.zsh
|
||||||
elif [ -f $HOME/.autojump/etc/profile.d/autojump.zsh ]; then # manual user-local installation
|
|
||||||
. $HOME/.autojump/etc/profile.d/autojump.zsh
|
|
||||||
elif [ -f /opt/local/etc/profile.d/autojump.zsh ]; then # mac os x with ports
|
elif [ -f /opt/local/etc/profile.d/autojump.zsh ]; then # mac os x with ports
|
||||||
. /opt/local/etc/profile.d/autojump.zsh
|
. /opt/local/etc/profile.d/autojump.zsh
|
||||||
elif [ $commands[brew] -a -f `brew --prefix`/etc/autojump.zsh ]; then # mac os x with brew
|
elif [ $commands[brew] -a -f `brew --prefix`/etc/autojump.zsh ]; then # mac os x with brew
|
||||||
|
|
|
||||||
0
plugins/bower/_bower
Executable file → Normal file
0
plugins/bower/_bower
Executable file → Normal file
|
|
@ -1 +1,2 @@
|
||||||
alias brews='brew list -1'
|
alias brews='brew list -1'
|
||||||
|
alias bubu="brew update && brew upgrade && brew cleanup"
|
||||||
|
|
|
||||||
49
plugins/bundler/README.md
Normal file
49
plugins/bundler/README.md
Normal file
|
|
@ -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`
|
||||||
|
|
@ -18,11 +18,13 @@ case $state in
|
||||||
"check[Determine whether the requirements for your application are installed]" \
|
"check[Determine whether the requirements for your application are installed]" \
|
||||||
"list[Show all of the gems in the current bundle]" \
|
"list[Show all of the gems in the current bundle]" \
|
||||||
"show[Show the source location of a particular gem in the bundle]" \
|
"show[Show the source location of a particular gem in the bundle]" \
|
||||||
|
"outdated[Show all of the outdated gems in the current bundle]" \
|
||||||
"console[Start an IRB session in the context of the current bundle]" \
|
"console[Start an IRB session in the context of the current bundle]" \
|
||||||
"open[Open an installed gem in the editor]" \
|
"open[Open an installed gem in the editor]" \
|
||||||
"viz[Generate a visual representation of your dependencies]" \
|
"viz[Generate a visual representation of your dependencies]" \
|
||||||
"init[Generate a simple Gemfile, placed in the current directory]" \
|
"init[Generate a simple Gemfile, placed in the current directory]" \
|
||||||
"gem[Create a simple gem, suitable for development with bundler]" \
|
"gem[Create a simple gem, suitable for development with bundler]" \
|
||||||
|
"platform[Displays platform compatibility information]" \
|
||||||
"clean[Cleans up unused gems in your bundler directory]" \
|
"clean[Cleans up unused gems in your bundler directory]" \
|
||||||
"help[Describe available tasks or one specific task]"
|
"help[Describe available tasks or one specific task]"
|
||||||
ret=0
|
ret=0
|
||||||
|
|
@ -39,11 +41,13 @@ case $state in
|
||||||
'check' \
|
'check' \
|
||||||
'list' \
|
'list' \
|
||||||
'show' \
|
'show' \
|
||||||
|
'outdated' \
|
||||||
'console' \
|
'console' \
|
||||||
'open' \
|
'open' \
|
||||||
'viz' \
|
'viz' \
|
||||||
'init' \
|
'init' \
|
||||||
'gem' \
|
'gem' \
|
||||||
|
'platform' \
|
||||||
'help' && ret=0
|
'help' && ret=0
|
||||||
;;
|
;;
|
||||||
install)
|
install)
|
||||||
|
|
@ -71,6 +75,15 @@ case $state in
|
||||||
'(--verbose)--verbose[Enable verbose output mode]'
|
'(--verbose)--verbose[Enable verbose output mode]'
|
||||||
ret=0
|
ret=0
|
||||||
;;
|
;;
|
||||||
|
outdated)
|
||||||
|
_arguments \
|
||||||
|
'(--pre)--pre[Check for newer pre-release gems]' \
|
||||||
|
'(--source)--source[Check against a specific source]' \
|
||||||
|
'(--local)--local[Do not attempt to fetch gems remotely and use the gem cache instead]' \
|
||||||
|
'(--no-color)--no-color[Disable colorization in output]' \
|
||||||
|
'(--verbose)--verbose[Enable verbose output mode]'
|
||||||
|
ret=0
|
||||||
|
;;
|
||||||
(open|show)
|
(open|show)
|
||||||
_gems=( $(bundle show 2> /dev/null | sed -e '/^ \*/!d; s/^ \* \([^ ]*\) .*/\1/') )
|
_gems=( $(bundle show 2> /dev/null | sed -e '/^ \*/!d; s/^ \* \([^ ]*\) .*/\1/') )
|
||||||
if [[ $_gems != "" ]]; then
|
if [[ $_gems != "" ]]; then
|
||||||
|
|
|
||||||
|
|
@ -3,19 +3,54 @@ alias bl="bundle list"
|
||||||
alias bp="bundle package"
|
alias bp="bundle package"
|
||||||
alias bo="bundle open"
|
alias bo="bundle open"
|
||||||
alias bu="bundle update"
|
alias bu="bundle update"
|
||||||
|
alias bi="bundle_install"
|
||||||
|
|
||||||
# The following is based on https://github.com/gma/bundler-exec
|
bundled_commands=(
|
||||||
|
annotate
|
||||||
bundled_commands=(annotate berks cap capify cucumber foodcritic foreman guard irb jekyll kitchen knife middleman nanoc puma rackup rainbows rake rspec ruby shotgun spec spin spork strainer tailor taps thin thor unicorn unicorn_rails)
|
cap
|
||||||
|
capify
|
||||||
|
cucumber
|
||||||
|
foodcritic
|
||||||
|
guard
|
||||||
|
irb
|
||||||
|
jekyll
|
||||||
|
kitchen
|
||||||
|
knife
|
||||||
|
middleman
|
||||||
|
nanoc
|
||||||
|
pry
|
||||||
|
puma
|
||||||
|
rackup
|
||||||
|
rainbows
|
||||||
|
rake
|
||||||
|
rspec
|
||||||
|
shotgun
|
||||||
|
sidekiq
|
||||||
|
spec
|
||||||
|
spork
|
||||||
|
spring
|
||||||
|
strainer
|
||||||
|
tailor
|
||||||
|
taps
|
||||||
|
thin
|
||||||
|
thor
|
||||||
|
unicorn
|
||||||
|
unicorn_rails
|
||||||
|
)
|
||||||
|
|
||||||
# Remove $UNBUNDLED_COMMANDS from the bundled_commands list
|
# Remove $UNBUNDLED_COMMANDS from the bundled_commands list
|
||||||
for cmd in $UNBUNDLED_COMMANDS; do
|
for cmd in $UNBUNDLED_COMMANDS; do
|
||||||
bundled_commands=(${bundled_commands#$cmd});
|
bundled_commands=(${bundled_commands#$cmd});
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Add $BUNDLED_COMMANDS to the bundled_commands list
|
||||||
|
for cmd in $BUNDLED_COMMANDS; do
|
||||||
|
bundled_commands+=($cmd);
|
||||||
|
done
|
||||||
|
|
||||||
## Functions
|
## Functions
|
||||||
|
|
||||||
bi() {
|
bundle_install() {
|
||||||
if _bundler-installed && _within-bundled-project; then
|
if _bundler-installed && _within-bundled-project; then
|
||||||
local bundler_version=`bundle version | cut -d' ' -f3`
|
local bundler_version=`bundle version | cut -d' ' -f3`
|
||||||
if [[ $bundler_version > '1.4.0' || $bundler_version = '1.4.0' ]]; then
|
if [[ $bundler_version > '1.4.0' || $bundler_version = '1.4.0' ]]; then
|
||||||
|
|
@ -39,17 +74,25 @@ _bundler-installed() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_within-bundled-project() {
|
_within-bundled-project() {
|
||||||
local check_dir=$PWD
|
local check_dir="$PWD"
|
||||||
while [ $check_dir != "/" ]; do
|
while [ "$check_dir" != "/" ]; do
|
||||||
[ -f "$check_dir/Gemfile" ] && return
|
[ -f "$check_dir/Gemfile" ] && return
|
||||||
check_dir="$(dirname $check_dir)"
|
check_dir="$(dirname $check_dir)"
|
||||||
done
|
done
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_binstubbed() {
|
||||||
|
[ -f "./bin/${1}" ]
|
||||||
|
}
|
||||||
|
|
||||||
_run-with-bundler() {
|
_run-with-bundler() {
|
||||||
if _bundler-installed && _within-bundled-project; then
|
if _bundler-installed && _within-bundled-project; then
|
||||||
bundle exec $@
|
if _binstubbed $1; then
|
||||||
|
./bin/$@
|
||||||
|
else
|
||||||
|
bundle exec $@
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
$@
|
$@
|
||||||
fi
|
fi
|
||||||
|
|
@ -62,7 +105,6 @@ for cmd in $bundled_commands; do
|
||||||
alias $cmd=bundled_$cmd
|
alias $cmd=bundled_$cmd
|
||||||
|
|
||||||
if which _$cmd > /dev/null 2>&1; then
|
if which _$cmd > /dev/null 2>&1; then
|
||||||
compdef _$cmd bundled_$cmd=$cmd
|
compdef _$cmd bundled_$cmd=$cmd
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,4 +19,4 @@ bindkey -a 'N' vi-join
|
||||||
bindkey -a 'j' vi-forward-word-end
|
bindkey -a 'j' vi-forward-word-end
|
||||||
bindkey -a 'J' vi-forward-blank-word-end
|
bindkey -a 'J' vi-forward-blank-word-end
|
||||||
|
|
||||||
lesskey $ZSH_CUSTOM/plugins/colemak/colemak-less
|
lesskey $ZSH/plugins/colemak/colemak-less
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
# Plugin for highligthing file content
|
# Plugin for highlighting file content
|
||||||
# Plugin highlights file content based on the filename extension.
|
# Plugin highlights file content based on the filename extension.
|
||||||
# If no highlighting method supported for given extension then it tries
|
# If no highlighting method supported for given extension then it tries
|
||||||
# guess it by looking for file content.
|
# guess it by looking for file content.
|
||||||
|
|
@ -6,9 +6,9 @@
|
||||||
alias colorize='colorize_via_pygmentize'
|
alias colorize='colorize_via_pygmentize'
|
||||||
|
|
||||||
colorize_via_pygmentize() {
|
colorize_via_pygmentize() {
|
||||||
if [ ! -x $(which pygmentize) ]; then
|
if [ ! -x "$(which pygmentize)" ]; then
|
||||||
echo package \'pygmentize\' is not installed!
|
echo "package \'pygmentize\' is not installed!"
|
||||||
exit -1
|
return -1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
|
|
@ -25,4 +25,4 @@ colorize_via_pygmentize() {
|
||||||
pygmentize -g "$FNAME"
|
pygmentize -g "$FNAME"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
# ls, the common ones I use a lot shortened for rapid fire usage
|
# ls, the common ones I use a lot shortened for rapid fire usage
|
||||||
alias ls='ls --color' #I like color
|
|
||||||
alias l='ls -lFh' #size,show type,human readable
|
alias l='ls -lFh' #size,show type,human readable
|
||||||
alias la='ls -lAFh' #long list,show almost all,show type,human readable
|
alias la='ls -lAFh' #long list,show almost all,show type,human readable
|
||||||
alias lr='ls -tRFh' #sorted by date,recursive,show type,human readable
|
alias lr='ls -tRFh' #sorted by date,recursive,show type,human readable
|
||||||
|
|
@ -39,7 +38,7 @@ alias -g NE="2> /dev/null"
|
||||||
alias -g NUL="> /dev/null 2>&1"
|
alias -g NUL="> /dev/null 2>&1"
|
||||||
alias -g P="2>&1| pygmentize -l pytb"
|
alias -g P="2>&1| pygmentize -l pytb"
|
||||||
|
|
||||||
alias dud='du --max-depth=1 -h'
|
alias dud='du -d 1 -h'
|
||||||
alias duf='du -sh *'
|
alias duf='du -sh *'
|
||||||
alias fd='find . -type d -name'
|
alias fd='find . -type d -name'
|
||||||
alias ff='find . -type f -name'
|
alias ff='find . -type f -name'
|
||||||
|
|
|
||||||
|
|
@ -46,3 +46,6 @@ alias cdu='composer dump-autoload'
|
||||||
|
|
||||||
# install composer in the current directory
|
# install composer in the current directory
|
||||||
alias cget='curl -s https://getcomposer.org/installer | php'
|
alias cget='curl -s https://getcomposer.org/installer | php'
|
||||||
|
|
||||||
|
# Add Composer's global binaries to PATH
|
||||||
|
export PATH=$PATH:~/.composer/vendor/bin
|
||||||
|
|
|
||||||
|
|
@ -141,6 +141,7 @@ _managepy-sqlinitialdata(){}
|
||||||
_managepy-sqlreset(){}
|
_managepy-sqlreset(){}
|
||||||
_managepy-sqlsequencereset(){}
|
_managepy-sqlsequencereset(){}
|
||||||
_managepy-startapp(){}
|
_managepy-startapp(){}
|
||||||
|
_managepy-startproject(){}
|
||||||
|
|
||||||
_managepy-syncdb() {
|
_managepy-syncdb() {
|
||||||
_arguments -s : \
|
_arguments -s : \
|
||||||
|
|
@ -198,6 +199,7 @@ _managepy-commands() {
|
||||||
'sqlreset:Prints the DROP TABLE SQL, then the CREATE TABLE SQL, for the given app name(s).'
|
'sqlreset:Prints the DROP TABLE SQL, then the CREATE TABLE SQL, for the given app name(s).'
|
||||||
'sqlsequencereset:Prints the SQL statements for resetting sequences for the given app name(s).'
|
'sqlsequencereset:Prints the SQL statements for resetting sequences for the given app name(s).'
|
||||||
"startapp:Creates a Django app directory structure for the given app name in this project's directory."
|
"startapp:Creates a Django app directory structure for the given app name in this project's directory."
|
||||||
|
"startproject:Creates a Django project directory structure for the given project name in this current directory."
|
||||||
"syncdb:Create the database tables for all apps in INSTALLED_APPS whose tables haven't already been created."
|
"syncdb:Create the database tables for all apps in INSTALLED_APPS whose tables haven't already been created."
|
||||||
'test:Runs the test suite for the specified applications, or the entire site if no apps are specified.'
|
'test:Runs the test suite for the specified applications, or the entire site if no apps are specified.'
|
||||||
'testserver:Runs a development server with data from the given fixture(s).'
|
'testserver:Runs a development server with data from the given fixture(s).'
|
||||||
|
|
|
||||||
|
|
@ -214,7 +214,7 @@ __save() {
|
||||||
__start() {
|
__start() {
|
||||||
_arguments \
|
_arguments \
|
||||||
'(-a,--attach=)'{-a,--attach=}'[Attach container''s stdout/stderr and forward all signals to the process]' \
|
'(-a,--attach=)'{-a,--attach=}'[Attach container''s stdout/stderr and forward all signals to the process]' \
|
||||||
'(-i,--interactive=)'{-i, --interactive=}'[Attach container''s stdin]'
|
'(-i,--interactive=)'{-i,--interactive=}'[Attach container''s stdin]'
|
||||||
__docker_containers
|
__docker_containers
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ function extract() {
|
||||||
(*.xz) unxz "$1" ;;
|
(*.xz) unxz "$1" ;;
|
||||||
(*.lzma) unlzma "$1" ;;
|
(*.lzma) unlzma "$1" ;;
|
||||||
(*.Z) uncompress "$1" ;;
|
(*.Z) uncompress "$1" ;;
|
||||||
(*.zip|*.war|*.jar) unzip "$1" -d $extract_dir ;;
|
(*.zip|*.war|*.jar|*.sublime-package) unzip "$1" -d $extract_dir ;;
|
||||||
(*.rar) unrar x -ad "$1" ;;
|
(*.rar) unrar x -ad "$1" ;;
|
||||||
(*.7z) 7za x "$1" ;;
|
(*.7z) 7za x "$1" ;;
|
||||||
(*.deb)
|
(*.deb)
|
||||||
|
|
|
||||||
82
plugins/frontend-search/README.md
Normal file
82
plugins/frontend-search/README.md
Normal file
|
|
@ -0,0 +1,82 @@
|
||||||
|
## Rationale ##
|
||||||
|
|
||||||
|
The idea for this script is to help searches in important doc contents from frontend.
|
||||||
|
|
||||||
|
## Instalation ##
|
||||||
|
|
||||||
|
I will send a Pull Request with this plugin for .oh-my-zsh official repository. If accept them, it's only add in plugins list that exists in ```.zshrc``` file.
|
||||||
|
|
||||||
|
For now, you can clone this repository and add in ```custom/plugins``` folder
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ git clone git://github.com/willmendesneto/frontend-search.git ~/.oh-my-zsh/custom/plugins/frontend-search
|
||||||
|
```
|
||||||
|
|
||||||
|
After this, restart your terminal and frontend-search plugin is configurated in you CLI.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
...
|
||||||
|
plugins=( <your-plugins-list>... frontend-search)
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
## Commands ##
|
||||||
|
|
||||||
|
All command searches are accept only in format
|
||||||
|
|
||||||
|
* `frontend <search-content> <search-term>`
|
||||||
|
|
||||||
|
The search content are
|
||||||
|
|
||||||
|
* `jquery <api.jquery.com>`
|
||||||
|
* `mdn <developer.mozilla.org>`
|
||||||
|
* `compass <compass-style.org>`
|
||||||
|
* `html5please <html5please.com>`
|
||||||
|
* `caniuse <caniuse.com>`
|
||||||
|
* `aurajs <aurajs.com>`
|
||||||
|
* `dartlang <api.dartlang.org/apidocs/channels/stable/dartdoc-viewer>`
|
||||||
|
* `lodash <search>`
|
||||||
|
* `qunit <api.qunitjs.com>`
|
||||||
|
* `fontello <fontello.com>`
|
||||||
|
* `bootsnipp <bootsnipp.com>`
|
||||||
|
* `cssflow <cssflow.com>`
|
||||||
|
* `codepen <codepen.io>`
|
||||||
|
* `unheap <www.unheap.com>`
|
||||||
|
* `bem <google.com/search?as_q=<search-term>&as_sitesearch=bem.info>`
|
||||||
|
* `smacss <google.com/search?as_q=<search-term>&as_sitesearch=smacss.com>`
|
||||||
|
* `angularjs <google.com/search?as_q=<search-term>&as_sitesearch=angularjs.org>`
|
||||||
|
* `reactjs <google.com/search?as_q=<search-term>&as_sitesearch=facebook.github.io/react>`
|
||||||
|
* `emberjs <emberjs.com>`
|
||||||
|
|
||||||
|
|
||||||
|
## Aliases ##
|
||||||
|
|
||||||
|
There are a few aliases presented as well:
|
||||||
|
|
||||||
|
* `jquery` A shorthand for `frontend jquery`
|
||||||
|
* `mdn` A shorthand for `frontend mdn`
|
||||||
|
* `compass` A shorthand for `frontend compass`
|
||||||
|
* `html5please` A shorthand for `frontend html5please`
|
||||||
|
* `caniuse` A shorthand for `frontend caniuse`
|
||||||
|
* `aurajs` A shorthand for `frontend aurajs`
|
||||||
|
* `dartlang` A shorthand for `frontend dartlang`
|
||||||
|
* `lodash` A shorthand for `frontend lodash`
|
||||||
|
* `qunit` A shorthand for `frontend qunit`
|
||||||
|
* `fontello` A shorthand for `frontend fontello`
|
||||||
|
* `bootsnipp` A shorthand for `frontend bootsnipp`
|
||||||
|
* `cssflow` A shorthand for `frontend cssflow`
|
||||||
|
* `codepen` A shorthand for `frontend codepen`
|
||||||
|
* `unheap` A shorthand for `frontend unheap`
|
||||||
|
* `bem` A shorthand for `frontend bem`
|
||||||
|
* `smacss` A shorthand for `frontend smacss`
|
||||||
|
* `angularjs` A shorthand for `frontend angularjs`
|
||||||
|
* `reactjs` A shorthand for `frontend reactjs`
|
||||||
|
* `emberjs` A shorthand for `frontend emberjs`
|
||||||
|
|
||||||
|
## Author
|
||||||
|
|
||||||
|
**Wilson Mendes (willmendesneto)**
|
||||||
|
+ <https://twitter.com/willmendesneto>
|
||||||
|
+ <http://github.com/willmendesneto>
|
||||||
|
|
||||||
|
New features comming soon.
|
||||||
151
plugins/frontend-search/frontend-search.plugin.zsh
Normal file
151
plugins/frontend-search/frontend-search.plugin.zsh
Normal file
|
|
@ -0,0 +1,151 @@
|
||||||
|
# frontend from terminal
|
||||||
|
|
||||||
|
function frontend() {
|
||||||
|
|
||||||
|
# get the open command
|
||||||
|
local open_cmd
|
||||||
|
if [[ $(uname -s) == 'Darwin' ]]; then
|
||||||
|
open_cmd='open'
|
||||||
|
else
|
||||||
|
open_cmd='xdg-open'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# no keyword provided, simply show how call methods
|
||||||
|
if [[ $# -le 1 ]]; then
|
||||||
|
echo "Please provide a search-content and a search-term for app.\nEx:\nfrontend <search-content> <search-term>\n"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# check whether the search engine is supported
|
||||||
|
if [[ ! $1 =~ '(jquery|mdn|compass|html5please|caniuse|aurajs|dartlang|qunit|fontello|bootsnipp|cssflow|codepen|unheap|bem|smacss|angularjs|reactjs|emberjs)' ]];
|
||||||
|
then
|
||||||
|
echo "Search valid search content $1 not supported."
|
||||||
|
echo "Valid contents: (formats 'frontend <search-content>' or '<search-content>')"
|
||||||
|
echo "* jquery"
|
||||||
|
echo "* mdn"
|
||||||
|
echo "* compass"
|
||||||
|
echo "* html5please"
|
||||||
|
echo "* caniuse"
|
||||||
|
echo "* aurajs"
|
||||||
|
echo "* dartlang"
|
||||||
|
echo "* lodash"
|
||||||
|
echo "* qunit"
|
||||||
|
echo "* fontello"
|
||||||
|
echo "* bootsnipp"
|
||||||
|
echo "* cssflow"
|
||||||
|
echo "* codepen"
|
||||||
|
echo "* unheap"
|
||||||
|
echo "* bem"
|
||||||
|
echo "* smacss"
|
||||||
|
echo "* angularjs"
|
||||||
|
echo "* reactjs"
|
||||||
|
echo "* emberjs"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
local url="http://"
|
||||||
|
local query=""
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
"jquery")
|
||||||
|
url="${url}api.jquery.com"
|
||||||
|
url="${url}/?s=$2" ;;
|
||||||
|
"mdn")
|
||||||
|
url="${url}developer.mozilla.org"
|
||||||
|
url="${url}/search?q=$2" ;;
|
||||||
|
"compass")
|
||||||
|
url="${url}compass-style.org"
|
||||||
|
url="${url}/search?q=$2" ;;
|
||||||
|
"html5please")
|
||||||
|
url="${url}html5please.com"
|
||||||
|
url="${url}/#$2" ;;
|
||||||
|
"caniuse")
|
||||||
|
url="${url}caniuse.com"
|
||||||
|
url="${url}/#search=$2" ;;
|
||||||
|
"aurajs")
|
||||||
|
url="${url}aurajs.com"
|
||||||
|
url="${url}/api/#stq=$2" ;;
|
||||||
|
"dartlang")
|
||||||
|
url="${url}api.dartlang.org/apidocs/channels/stable/dartdoc-viewer"
|
||||||
|
url="${url}/dart-$2" ;;
|
||||||
|
"qunit")
|
||||||
|
url="${url}api.qunitjs.com"
|
||||||
|
url="${url}/?s=$2" ;;
|
||||||
|
"fontello")
|
||||||
|
url="${url}fontello.com"
|
||||||
|
url="${url}/#search=$2" ;;
|
||||||
|
"bootsnipp")
|
||||||
|
url="${url}bootsnipp.com"
|
||||||
|
url="${url}/search?q=$2" ;;
|
||||||
|
"cssflow")
|
||||||
|
url="${url}cssflow.com"
|
||||||
|
url="${url}/search?q=$2" ;;
|
||||||
|
"codepen")
|
||||||
|
url="${url}codepen.io"
|
||||||
|
url="${url}/search?q=$2" ;;
|
||||||
|
"unheap")
|
||||||
|
url="${url}www.unheap.com"
|
||||||
|
url="${url}/?s=$2" ;;
|
||||||
|
"bem")
|
||||||
|
url="${url}google.com"
|
||||||
|
url="${url}/search?as_q=$2&as_sitesearch=bem.info" ;;
|
||||||
|
"smacss")
|
||||||
|
url="${url}google.com"
|
||||||
|
url="${url}/search?as_q=$2&as_sitesearch=smacss.com" ;;
|
||||||
|
"angularjs")
|
||||||
|
url="${url}google.com"
|
||||||
|
url="${url}/search?as_q=$2&as_sitesearch=angularjs.org" ;;
|
||||||
|
"reactjs")
|
||||||
|
url="${url}google.com"
|
||||||
|
url="${url}/search?as_q=$2&as_sitesearch=facebook.github.io/react" ;;
|
||||||
|
"emberjs")
|
||||||
|
url="${url}emberjs.com"
|
||||||
|
url="${url}/api/#stq=$2&stp=1" ;;
|
||||||
|
*) echo "INVALID PARAM!"
|
||||||
|
return ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
echo "$url"
|
||||||
|
|
||||||
|
$open_cmd "$url"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
# javascript
|
||||||
|
alias jquery='frontend jquery'
|
||||||
|
alias mdn='frontend mdn'
|
||||||
|
|
||||||
|
# pre processors frameworks
|
||||||
|
alias compass='frontend compass'
|
||||||
|
|
||||||
|
# important links
|
||||||
|
alias html5please='frontend html5please'
|
||||||
|
alias caniuse='frontend caniuse'
|
||||||
|
|
||||||
|
# components and libraries
|
||||||
|
alias aurajs='frontend aurajs'
|
||||||
|
alias dartlang='frontend dartlang'
|
||||||
|
alias lodash='frontend lodash'
|
||||||
|
|
||||||
|
#tests
|
||||||
|
alias qunit='frontend qunit'
|
||||||
|
|
||||||
|
#fonts
|
||||||
|
alias fontello='frontend fontello'
|
||||||
|
|
||||||
|
# snippets
|
||||||
|
alias bootsnipp='frontend bootsnipp'
|
||||||
|
alias cssflow='frontend cssflow'
|
||||||
|
alias codepen='frontend codepen'
|
||||||
|
alias unheap='frontend unheap'
|
||||||
|
|
||||||
|
# css architecture
|
||||||
|
alias bem='frontend bem'
|
||||||
|
alias smacss='frontend smacss'
|
||||||
|
|
||||||
|
# frameworks
|
||||||
|
alias angularjs='frontend angularjs'
|
||||||
|
alias reactjs='frontend reactjs'
|
||||||
|
alias emberjs='frontend emberjs'
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python2
|
||||||
# -*- coding: UTF-8 -*-
|
# -*- coding: UTF-8 -*-
|
||||||
from subprocess import Popen, PIPE
|
from subprocess import Popen, PIPE
|
||||||
import re
|
import re
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ fi
|
||||||
#
|
#
|
||||||
# Use this when creating a new repo from scratch.
|
# Use this when creating a new repo from scratch.
|
||||||
empty_gh() { # [NAME_OF_REPO]
|
empty_gh() { # [NAME_OF_REPO]
|
||||||
repo = $1
|
repo=$1
|
||||||
ghuser=$( git config github.user )
|
ghuser=$( git config github.user )
|
||||||
|
|
||||||
mkdir "$repo"
|
mkdir "$repo"
|
||||||
|
|
|
||||||
|
|
@ -158,3 +158,6 @@ __go_tool_complete() {
|
||||||
}
|
}
|
||||||
|
|
||||||
compdef __go_tool_complete go
|
compdef __go_tool_complete go
|
||||||
|
|
||||||
|
# aliases
|
||||||
|
alias gfa='go fmt . ./...'
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ function in_gradle() {
|
||||||
############################################################################
|
############################################################################
|
||||||
_gradle_does_task_list_need_generating () {
|
_gradle_does_task_list_need_generating () {
|
||||||
[ ! -f .gradletasknamecache ] && return 0;
|
[ ! -f .gradletasknamecache ] && return 0;
|
||||||
[ .gradletasknamecache -nt build.gradle ] && return 0;
|
[ build.gradle -nt .gradletasknamecache ] && return 0;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
0
plugins/grails/grails.plugin.zsh
Executable file → Normal file
0
plugins/grails/grails.plugin.zsh
Executable file → Normal file
|
|
@ -29,15 +29,23 @@ open_jira_issue () {
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f .jira-prefix ]; then
|
||||||
|
jira_prefix=$(cat .jira-prefix)
|
||||||
|
elif [ -f ~/.jira-prefix ]; then
|
||||||
|
jira_prefix=$(cat ~/.jira-prefix)
|
||||||
|
else
|
||||||
|
jira_prefix=""
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
echo "Opening new issue"
|
echo "Opening new issue"
|
||||||
$open_cmd "$jira_url/secure/CreateIssue!default.jspa"
|
$open_cmd "$jira_url/secure/CreateIssue!default.jspa"
|
||||||
else
|
else
|
||||||
echo "Opening issue #$1"
|
echo "Opening issue #$1"
|
||||||
if [[ "x$JIRA_RAPID_BOARD" = "xtrue" ]]; then
|
if [[ "x$JIRA_RAPID_BOARD" = "xtrue" ]]; then
|
||||||
$open_cmd "$jira_url/issues/$1"
|
$open_cmd "$jira_url/issues/$jira_prefix$1"
|
||||||
else
|
else
|
||||||
$open_cmd "$jira_url/browse/$1"
|
$open_cmd "$jira_url/browse/$jira_prefix$1"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
||||||
0
plugins/jruby/jruby.plugin.zsh
Executable file → Normal file
0
plugins/jruby/jruby.plugin.zsh
Executable file → Normal file
|
|
@ -39,7 +39,7 @@ marks() {
|
||||||
|
|
||||||
_completemarks() {
|
_completemarks() {
|
||||||
if [[ $(ls "${MARKPATH}" | wc -l) -gt 1 ]]; then
|
if [[ $(ls "${MARKPATH}" | wc -l) -gt 1 ]]; then
|
||||||
reply=($(ls $MARKPATH/**/*(-) | grep : | sed -E 's/(.*)\/([_\da-zA-Z\-]*):$/\2/g'))
|
reply=($(ls $MARKPATH/**/*(-) | grep : | sed -E 's/(.*)\/([_a-zA-Z0-9\.\-]*):$/\2/g'))
|
||||||
else
|
else
|
||||||
if readlink -e "${MARKPATH}"/* &>/dev/null; then
|
if readlink -e "${MARKPATH}"/* &>/dev/null; then
|
||||||
reply=($(ls "${MARKPATH}"))
|
reply=($(ls "${MARKPATH}"))
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@ alias hgs='hg status'
|
||||||
alias hgsl='hg log --limit 20 --template "{node|short} | {date|isodatesec} | {author|user}: {desc|strip|firstline}\n" '
|
alias hgsl='hg log --limit 20 --template "{node|short} | {date|isodatesec} | {author|user}: {desc|strip|firstline}\n" '
|
||||||
# this is the 'git commit --amend' equivalent
|
# this is the 'git commit --amend' equivalent
|
||||||
alias hgca='hg qimport -r tip ; hg qrefresh -e ; hg qfinish tip'
|
alias hgca='hg qimport -r tip ; hg qrefresh -e ; hg qfinish tip'
|
||||||
|
# list unresolved files (since hg does not list unmerged files in the status command)
|
||||||
|
alias hgun='hg resolve --list'
|
||||||
|
|
||||||
function in_hg() {
|
function in_hg() {
|
||||||
if [[ -d .hg ]] || $(hg summary > /dev/null 2>&1); then
|
if [[ -d .hg ]] || $(hg summary > /dev/null 2>&1); then
|
||||||
|
|
|
||||||
|
|
@ -44,19 +44,22 @@ mvn-color()
|
||||||
# aliases
|
# aliases
|
||||||
alias mvncie='mvn clean install eclipse:eclipse'
|
alias mvncie='mvn clean install eclipse:eclipse'
|
||||||
alias mvnci='mvn clean install'
|
alias mvnci='mvn clean install'
|
||||||
|
alias mvncist='mvn clean install -DskipTests'
|
||||||
alias mvne='mvn eclipse:eclipse'
|
alias mvne='mvn eclipse:eclipse'
|
||||||
alias mvnce='mvn clean eclipse:clean eclipse:eclipse'
|
alias mvnce='mvn clean eclipse:clean eclipse:eclipse'
|
||||||
alias mvnd='mvn deploy'
|
alias mvnd='mvn deploy'
|
||||||
alias mvnp='mvn package'
|
alias mvnp='mvn package'
|
||||||
alias mvnc='mvn clean'
|
alias mvnc='mvn clean'
|
||||||
alias mvncom='mvn compile'
|
alias mvncom='mvn compile'
|
||||||
|
alias mvnct='mvn clean test'
|
||||||
alias mvnt='mvn test'
|
alias mvnt='mvn test'
|
||||||
alias mvnag='mvn archetype:generate'
|
alias mvnag='mvn archetype:generate'
|
||||||
alias mvn-updates='mvn versions:display-dependency-updates'
|
alias mvn-updates='mvn versions:display-dependency-updates'
|
||||||
alias mvntc7='mvn tomcat7:run'
|
alias mvntc7='mvn tomcat7:run'
|
||||||
alias mvntc='mvn tomcat:run'
|
alias mvntc='mvn tomcat:run'
|
||||||
alias mvnjetty='mvn jetty:run'
|
alias mvnjetty='mvn jetty:run'
|
||||||
|
alias mvndt='mvn dependency:tree'
|
||||||
|
alias mvns='mvn site'
|
||||||
|
|
||||||
function listMavenCompletions {
|
function listMavenCompletions {
|
||||||
reply=(
|
reply=(
|
||||||
|
|
@ -126,6 +129,8 @@ function listMavenCompletions {
|
||||||
tomcat6:run tomcat6:run-war tomcat6:run-war-only tomcat6:stop tomcat6:deploy tomcat6:undeploy
|
tomcat6:run tomcat6:run-war tomcat6:run-war-only tomcat6:stop tomcat6:deploy tomcat6:undeploy
|
||||||
# tomcat7
|
# tomcat7
|
||||||
tomcat7:run tomcat7:run-war tomcat7:run-war-only tomcat7:deploy
|
tomcat7:run tomcat7:run-war tomcat7:run-war-only tomcat7:deploy
|
||||||
|
# spring-boot
|
||||||
|
spring-boot:run spring-boot:repackage
|
||||||
# exec
|
# exec
|
||||||
exec:exec exec:java
|
exec:exec exec:java
|
||||||
# versions
|
# versions
|
||||||
|
|
|
||||||
|
|
@ -174,12 +174,16 @@ function itunes() {
|
||||||
next|previous)
|
next|previous)
|
||||||
opt="$opt track"
|
opt="$opt track"
|
||||||
;;
|
;;
|
||||||
|
vol)
|
||||||
|
opt="set sound volume to $1" #$1 Due to the shift
|
||||||
|
;;
|
||||||
""|-h|--help)
|
""|-h|--help)
|
||||||
echo "Usage: itunes <option>"
|
echo "Usage: itunes <option>"
|
||||||
echo "option:"
|
echo "option:"
|
||||||
echo "\tlaunch|play|pause|stop|rewind|resume|quit"
|
echo "\tlaunch|play|pause|stop|rewind|resume|quit"
|
||||||
echo "\tmute|unmute\tcontrol volume set"
|
echo "\tmute|unmute\tcontrol volume set"
|
||||||
echo "\tnext|previous\tplay next or previous track"
|
echo "\tnext|previous\tplay next or previous track"
|
||||||
|
echo "\tvol\tSet the volume, takes an argument from 0 to 100"
|
||||||
echo "\thelp\tshow this message and exit"
|
echo "\thelp\tshow this message and exit"
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
|
|
@ -190,4 +194,3 @@ function itunes() {
|
||||||
esac
|
esac
|
||||||
osascript -e "tell application \"iTunes\" to $opt"
|
osascript -e "tell application \"iTunes\" to $opt"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#compdef pip
|
#compdef pip pip2 pip-2.7 pip3 pip-3.2 pip-3.3 pip-3.4
|
||||||
#autoload
|
#autoload
|
||||||
|
|
||||||
# pip zsh completion, based on homebrew completion
|
# pip zsh completion, based on homebrew completion
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
# Aliases to stop, start and restart Postgres
|
# Aliases to control Postgres
|
||||||
# Paths noted below are for Postgress installed via Homebrew on OSX
|
# 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 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 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'
|
||||||
|
|
@ -7,7 +7,7 @@ _rbenv-from-homebrew-installed() {
|
||||||
}
|
}
|
||||||
|
|
||||||
FOUND_RBENV=0
|
FOUND_RBENV=0
|
||||||
rbenvdirs=("$HOME/.rbenv" "/usr/local/rbenv" "/opt/rbenv")
|
rbenvdirs=("$HOME/.rbenv" "/usr/local/rbenv" "/opt/rbenv" "/usr/local/opt/rbenv")
|
||||||
if _homebrew-installed && _rbenv-from-homebrew-installed ; then
|
if _homebrew-installed && _rbenv-from-homebrew-installed ; then
|
||||||
rbenvdirs=($(brew --prefix rbenv) "${rbenvdirs[@]}")
|
rbenvdirs=($(brew --prefix rbenv) "${rbenvdirs[@]}")
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -10,3 +10,9 @@ compdef _repo rs='repo sync'
|
||||||
|
|
||||||
alias rsrra='repo sync ; repo rebase --auto-stash'
|
alias rsrra='repo sync ; repo rebase --auto-stash'
|
||||||
compdef _repo rsrra='repo sync ; repo rebase --auto-stash'
|
compdef _repo rsrra='repo sync ; repo rebase --auto-stash'
|
||||||
|
|
||||||
|
alias ru='repo upload'
|
||||||
|
compdef _repo ru='repo upload'
|
||||||
|
|
||||||
|
alias rst='repo status'
|
||||||
|
compdef _repo rst='repo status'
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
alias rsync-copy="rsync -av --progress -h"
|
alias rsync-copy="rsync -avz --progress -h"
|
||||||
alias rsync-move="rsync -av --progress -h --remove-source-files"
|
alias rsync-move="rsync -avz --progress -h --remove-source-files"
|
||||||
alias rsync-update="rsync -avu --progress -h"
|
alias rsync-update="rsync -avzu --progress -h"
|
||||||
alias rsync-synchronize="rsync -avu --delete --progress -h"
|
alias rsync-synchronize="rsync -avzu --delete --progress -h"
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ alias gemsets='rvm gemset list'
|
||||||
local ruby18='ruby-1.8.7'
|
local ruby18='ruby-1.8.7'
|
||||||
local ruby19='ruby-1.9.3'
|
local ruby19='ruby-1.9.3'
|
||||||
local ruby20='ruby-2.0.0'
|
local ruby20='ruby-2.0.0'
|
||||||
|
local ruby21='ruby-2.1.2'
|
||||||
|
|
||||||
function rb18 {
|
function rb18 {
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
|
|
@ -40,6 +41,17 @@ function rb20 {
|
||||||
_rb20() {compadd `ls -1 $rvm_path/gems | grep "^$ruby20@" | sed -e "s/^$ruby20@//" | awk '{print $1}'`}
|
_rb20() {compadd `ls -1 $rvm_path/gems | grep "^$ruby20@" | sed -e "s/^$ruby20@//" | awk '{print $1}'`}
|
||||||
compdef _rb20 rb20
|
compdef _rb20 rb20
|
||||||
|
|
||||||
|
function rb21 {
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
rvm use "$ruby21"
|
||||||
|
else
|
||||||
|
rvm use "$ruby21@$1"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
_rb21() {compadd `ls -1 $rvm_path/gems | grep "^$ruby21@" | sed -e "s/^$ruby21@//" | awk '{print $1}'`}
|
||||||
|
compdef _rb21 rb21
|
||||||
|
|
||||||
function rvm-update {
|
function rvm-update {
|
||||||
rvm get head
|
rvm get head
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#
|
#
|
||||||
# INSTRUCTIONS
|
# INSTRUCTIONS
|
||||||
#
|
#
|
||||||
# To enabled agent forwarding support add the following to
|
# To enable agent forwarding support add the following to
|
||||||
# your .zshrc file:
|
# your .zshrc file:
|
||||||
#
|
#
|
||||||
# zstyle :omz:plugins:ssh-agent agent-forwarding on
|
# zstyle :omz:plugins:ssh-agent agent-forwarding on
|
||||||
|
|
|
||||||
1
plugins/sublime/sublime.plugin.zsh
Executable file → Normal file
1
plugins/sublime/sublime.plugin.zsh
Executable file → Normal file
|
|
@ -7,6 +7,7 @@ if [[ $('uname') == 'Linux' ]]; then
|
||||||
"/opt/sublime_text/sublime_text"
|
"/opt/sublime_text/sublime_text"
|
||||||
"/usr/bin/sublime_text"
|
"/usr/bin/sublime_text"
|
||||||
"/usr/local/bin/sublime_text"
|
"/usr/local/bin/sublime_text"
|
||||||
|
"/usr/bin/subl"
|
||||||
)
|
)
|
||||||
for _sublime_path in $_sublime_linux_paths; do
|
for _sublime_path in $_sublime_linux_paths; do
|
||||||
if [[ -a $_sublime_path ]]; then
|
if [[ -a $_sublime_path ]]; then
|
||||||
|
|
|
||||||
|
|
@ -22,5 +22,7 @@ compdef _symfony2 sf
|
||||||
#Alias
|
#Alias
|
||||||
alias sf='`_symfony_console`'
|
alias sf='`_symfony_console`'
|
||||||
alias sfcl='sf cache:clear'
|
alias sfcl='sf cache:clear'
|
||||||
|
alias sfcw='sf cache:warmup'
|
||||||
alias sfroute='sf router:debug'
|
alias sfroute='sf router:debug'
|
||||||
alias sfgb='sf generate:bundle'
|
alias sfcontainer='sf container:debug'
|
||||||
|
alias sfgb='sf generate:bundle'
|
||||||
|
|
@ -8,6 +8,8 @@ _1st_arguments=(
|
||||||
'box:Box commands'
|
'box:Box commands'
|
||||||
'connect:Connects to a shared, remote Vagrant environment'
|
'connect:Connects to a shared, remote Vagrant environment'
|
||||||
'destroy:Destroys the vagrant environment'
|
'destroy:Destroys the vagrant environment'
|
||||||
|
'docker-logs:Shows Docker logs'
|
||||||
|
'docker-run:Run one-off commands against a Docker container'
|
||||||
'global-status:Reports the status of all active Vagrant environments on the system'
|
'global-status:Reports the status of all active Vagrant environments on the system'
|
||||||
'halt:Halts the currently running vagrant environment'
|
'halt:Halts the currently running vagrant environment'
|
||||||
'init:[box_name] [box_url] Initializes current folder for Vagrant usage'
|
'init:[box_name] [box_url] Initializes current folder for Vagrant usage'
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ function vundle-init () {
|
||||||
mkdir -p ~/.vim/bundle/vundle/
|
mkdir -p ~/.vim/bundle/vundle/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d ~/.vim/bundle/vundle/.git/ ]
|
if [ ! -d ~/.vim/bundle/vundle/.git ] && [ ! -f ~/.vim/bundle/vundle/.git ]
|
||||||
then
|
then
|
||||||
git clone http://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
|
git clone http://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
|
||||||
echo "\n\tRead about vim configuration for vundle at https://github.com/gmarik/vundle\n"
|
echo "\n\tRead about vim configuration for vundle at https://github.com/gmarik/vundle\n"
|
||||||
|
|
|
||||||
0
plugins/wd/wd.plugin.zsh
Executable file → Normal file
0
plugins/wd/wd.plugin.zsh
Executable file → Normal file
|
|
@ -58,7 +58,7 @@ wd_warp()
|
||||||
#wd_print_msg $BLUE "Warping..."
|
#wd_print_msg $BLUE "Warping..."
|
||||||
cd ${points[$1]}
|
cd ${points[$1]}
|
||||||
else
|
else
|
||||||
wd_print_msg $RED "Unkown warp point '$1'"
|
wd_print_msg $RED "Unknown warp point '$1'"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#xc function courtesy of http://gist.github.com/subdigital/5420709
|
#xc function courtesy of http://gist.github.com/subdigital/5420709
|
||||||
function xc {
|
function xc {
|
||||||
xcode_proj=`find . -name "*.xc*" -d 1 | sort -r | head -1`
|
xcode_proj=`ls | grep "\.xc" | sort -r | head -1`
|
||||||
if [[ `echo -n $xcode_proj | wc -m` == 0 ]]
|
if [[ `echo -n $xcode_proj | wc -m` == 0 ]]
|
||||||
then
|
then
|
||||||
echo "No xcworkspace/xcodeproj file found in the current directory."
|
echo "No xcworkspace/xcodeproj file found in the current directory."
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,6 @@ export ZSH=$HOME/.oh-my-zsh
|
||||||
# time that oh-my-zsh is loaded.
|
# time that oh-my-zsh is loaded.
|
||||||
ZSH_THEME="robbyrussell"
|
ZSH_THEME="robbyrussell"
|
||||||
|
|
||||||
# Example aliases
|
|
||||||
# alias zshconfig="mate ~/.zshrc"
|
|
||||||
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
|
||||||
|
|
||||||
# Uncomment the following line to use case-sensitive completion.
|
# Uncomment the following line to use case-sensitive completion.
|
||||||
# CASE_SENSITIVE="true"
|
# CASE_SENSITIVE="true"
|
||||||
|
|
||||||
|
|
@ -26,8 +22,8 @@ ZSH_THEME="robbyrussell"
|
||||||
# Uncomment the following line to disable auto-setting terminal title.
|
# Uncomment the following line to disable auto-setting terminal title.
|
||||||
# DISABLE_AUTO_TITLE="true"
|
# DISABLE_AUTO_TITLE="true"
|
||||||
|
|
||||||
# Uncomment the following line to disable command auto-correction.
|
# Uncomment the following line to enable command auto-correction.
|
||||||
# DISABLE_CORRECTION="true"
|
# ENABLE_CORRECTION="true"
|
||||||
|
|
||||||
# Uncomment the following line to display red dots whilst waiting for completion.
|
# Uncomment the following line to display red dots whilst waiting for completion.
|
||||||
# COMPLETION_WAITING_DOTS="true"
|
# COMPLETION_WAITING_DOTS="true"
|
||||||
|
|
@ -48,6 +44,7 @@ ZSH_THEME="robbyrussell"
|
||||||
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
|
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
|
||||||
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
|
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
|
||||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||||
|
# Add wisely, as too many plugins slow down shell startup.
|
||||||
plugins=(git)
|
plugins=(git)
|
||||||
|
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
@ -72,3 +69,12 @@ export PATH=$HOME/bin:/usr/local/bin:$PATH
|
||||||
|
|
||||||
# ssh
|
# ssh
|
||||||
# export SSH_KEY_PATH="~/.ssh/dsa_id"
|
# export SSH_KEY_PATH="~/.ssh/dsa_id"
|
||||||
|
|
||||||
|
# Set personal aliases, overriding those provided by oh-my-zsh libs,
|
||||||
|
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
|
||||||
|
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
|
||||||
|
# For a full list of active aliases, run `alias`.
|
||||||
|
#
|
||||||
|
# Example aliases
|
||||||
|
# alias zshconfig="mate ~/.zshrc"
|
||||||
|
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
||||||
|
|
|
||||||
|
|
@ -32,11 +32,12 @@ function check_git_prompt_info() {
|
||||||
|
|
||||||
# Determine if we are using a gemset.
|
# Determine if we are using a gemset.
|
||||||
function rvm_gemset() {
|
function rvm_gemset() {
|
||||||
GEMSET=`rvm gemset list | grep '=>' | cut -b4-`
|
if hash rvm 2>/dev/null; then
|
||||||
if [[ -n $GEMSET ]]; then
|
GEMSET=`rvm gemset list | grep '=>' | cut -b4-`
|
||||||
echo "%{$fg[yellow]%}$GEMSET%{$reset_color%}|"
|
if [[ -n $GEMSET ]]; then
|
||||||
fi
|
echo "%{$fg[yellow]%}$GEMSET%{$reset_color%}|"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Determine the time since last commit. If branch is clean,
|
# Determine the time since last commit. If branch is clean,
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ bureau_git_prompt () {
|
||||||
|
|
||||||
_PATH="%{$fg_bold[white]%}%~%{$reset_color%}"
|
_PATH="%{$fg_bold[white]%}%~%{$reset_color%}"
|
||||||
|
|
||||||
if [[ "%#" == "#" ]]; then
|
if [[ $EUID -eq 0 ]]; then
|
||||||
_USERNAME="%{$fg_bold[red]%}%n"
|
_USERNAME="%{$fg_bold[red]%}%n"
|
||||||
_LIBERTY="%{$fg[red]%}#"
|
_LIBERTY="%{$fg[red]%}#"
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,11 @@ eval PR_NO_COLOR="%{$terminfo[sgr0]%}"
|
||||||
eval PR_BOLD="%{$terminfo[bold]%}"
|
eval PR_BOLD="%{$terminfo[bold]%}"
|
||||||
|
|
||||||
# Check the UID
|
# Check the UID
|
||||||
if [[ $UID -ge 1000 ]]; then # normal user
|
if [[ $UID -ne 0 ]]; then # normal user
|
||||||
eval PR_USER='${PR_GREEN}%n${PR_NO_COLOR}'
|
eval PR_USER='${PR_GREEN}%n${PR_NO_COLOR}'
|
||||||
eval PR_USER_OP='${PR_GREEN}%#${PR_NO_COLOR}'
|
eval PR_USER_OP='${PR_GREEN}%#${PR_NO_COLOR}'
|
||||||
local PR_PROMPT='$PR_NO_COLOR➤ $PR_NO_COLOR'
|
local PR_PROMPT='$PR_NO_COLOR➤ $PR_NO_COLOR'
|
||||||
elif [[ $UID -eq 0 ]]; then # root
|
else # root
|
||||||
eval PR_USER='${PR_RED}%n${PR_NO_COLOR}'
|
eval PR_USER='${PR_RED}%n${PR_NO_COLOR}'
|
||||||
eval PR_USER_OP='${PR_RED}%#${PR_NO_COLOR}'
|
eval PR_USER_OP='${PR_RED}%#${PR_NO_COLOR}'
|
||||||
local PR_PROMPT='$PR_RED➤ $PR_NO_COLOR'
|
local PR_PROMPT='$PR_RED➤ $PR_NO_COLOR'
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ add-zsh-hook chpwd steeef_chpwd
|
||||||
function steeef_precmd {
|
function steeef_precmd {
|
||||||
if [[ -n "$PR_GIT_UPDATE" ]] ; then
|
if [[ -n "$PR_GIT_UPDATE" ]] ; then
|
||||||
# check for untracked files or updated submodules, since vcs_info doesn't
|
# check for untracked files or updated submodules, since vcs_info doesn't
|
||||||
if git ls-files --other --exclude-standard --directory 2> /dev/null | grep -q "."; then
|
if git ls-files --other --exclude-standard 2> /dev/null | grep -q "."; then
|
||||||
PR_GIT_UPDATE=1
|
PR_GIT_UPDATE=1
|
||||||
FMT_BRANCH="(%{$turquoise%}%b%u%c%{$hotpink%}●${PR_RST})"
|
FMT_BRANCH="(%{$turquoise%}%b%u%c%{$hotpink%}●${PR_RST})"
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
PROMPT='%{$fg[green]%} %% '
|
PROMPT='%(?,%{$fg[green]%},%{$fg[red]%}) %% '
|
||||||
# RPS1='%{$fg[blue]%}%~%{$reset_color%} '
|
# RPS1='%{$fg[blue]%}%~%{$reset_color%} '
|
||||||
RPS1='%{$fg[white]%}%2~$(git_prompt_info) %{$fg_bold[blue]%}%m%{$reset_color%}'
|
RPS1='%{$fg[white]%}%2~$(git_prompt_info) %{$fg_bold[blue]%}%m%{$reset_color%}'
|
||||||
|
|
||||||
|
|
@ -6,4 +6,3 @@ ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[yellow]%}("
|
||||||
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}"
|
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}"
|
||||||
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
||||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%} ⚡%{$fg[yellow]%}"
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%} ⚡%{$fg[yellow]%}"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ function _current_epoch() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function _update_zsh_update() {
|
function _update_zsh_update() {
|
||||||
echo "LAST_EPOCH=$(_current_epoch)" > ~/.zsh-update
|
echo "LAST_EPOCH=$(_current_epoch)" >! ~/.zsh-update
|
||||||
}
|
}
|
||||||
|
|
||||||
function _upgrade_zsh() {
|
function _upgrade_zsh() {
|
||||||
|
|
@ -22,6 +22,10 @@ fi
|
||||||
|
|
||||||
[ -f ~/.profile ] && source ~/.profile
|
[ -f ~/.profile ] && source ~/.profile
|
||||||
|
|
||||||
|
# Cancel upgrade if the current user doesn't have write permissions for the
|
||||||
|
# oh-my-zsh directory.
|
||||||
|
[[ -w "$ZSH" ]] || return 0
|
||||||
|
|
||||||
if [ -f ~/.zsh-update ]
|
if [ -f ~/.zsh-update ]
|
||||||
then
|
then
|
||||||
. ~/.zsh-update
|
. ~/.zsh-update
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue