mirror of
				https://github.com/dcarrillo/prezto.git
				synced 2025-11-04 07:29:09 +00:00 
			
		
		
		
	Compare commits
	
		
			4 Commits
		
	
	
		
			pull/715-g
			...
			pull/599-t
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					5590b56a87 | ||
| 
						 | 
					adaa029a1b | ||
| 
						 | 
					141bfd8c1e | ||
| 
						 | 
					b5bcc89ae6 | 
@@ -237,7 +237,6 @@ Functions
 | 
			
		||||
  - `git-stash-recover` recovers given dropped stashed states.
 | 
			
		||||
  - `git-submodule-move` moves a submodule.
 | 
			
		||||
  - `git-submodule-remove` removes a submodule.
 | 
			
		||||
  - `git-ignore-template` get gitignore template from [gitignore.io][9]
 | 
			
		||||
 | 
			
		||||
Theming
 | 
			
		||||
-------
 | 
			
		||||
@@ -333,4 +332,3 @@ Authors
 | 
			
		||||
[6]: https://github.com/sorin-ionescu/prezto/issues
 | 
			
		||||
[7]: https://github.com/sorin-ionescu/prezto/issues/219
 | 
			
		||||
[8]: http://www.kernel.org/pub/software/scm/git/docs/git-log.html
 | 
			
		||||
[9]: https://gitignore.io/
 | 
			
		||||
 
 | 
			
		||||
@@ -100,12 +100,12 @@ alias gix='git rm -r --cached'
 | 
			
		||||
alias giX='git rm -rf --cached'
 | 
			
		||||
 | 
			
		||||
# Log (l)
 | 
			
		||||
alias gl='git log --topo-order --pretty=format:"${_git_log_medium_format}"'
 | 
			
		||||
alias gls='git log --topo-order --stat --pretty=format:"${_git_log_medium_format}"'
 | 
			
		||||
alias gld='git log --topo-order --stat --patch --full-diff --pretty=format:"${_git_log_medium_format}"'
 | 
			
		||||
alias glo='git log --topo-order --pretty=format:"${_git_log_oneline_format}"'
 | 
			
		||||
alias glg='git log --topo-order --all --graph --pretty=format:"${_git_log_oneline_format}"'
 | 
			
		||||
alias glb='git log --topo-order --pretty=format:"${_git_log_brief_format}"'
 | 
			
		||||
alias gl='git log --topo-order --pretty=format:${_git_log_medium_format}'
 | 
			
		||||
alias gls='git log --topo-order --stat --pretty=format:${_git_log_medium_format}'
 | 
			
		||||
alias gld='git log --topo-order --stat --patch --full-diff --pretty=format:${_git_log_medium_format}'
 | 
			
		||||
alias glo='git log --topo-order --pretty=format:${_git_log_oneline_format}'
 | 
			
		||||
alias glg='git log --topo-order --all --graph --pretty=format:${_git_log_oneline_format}'
 | 
			
		||||
alias glb='git log --topo-order --pretty=format:${_git_log_brief_format}'
 | 
			
		||||
alias glc='git shortlog --summary --numbered'
 | 
			
		||||
 | 
			
		||||
# Merge (m)
 | 
			
		||||
@@ -179,6 +179,3 @@ alias gwc='git clean -n'
 | 
			
		||||
alias gwC='git clean -f'
 | 
			
		||||
alias gwx='git rm -r'
 | 
			
		||||
alias gwX='git rm -rf'
 | 
			
		||||
 | 
			
		||||
# Ignore list (ig)
 | 
			
		||||
alias gig='git-ignore-template'
 | 
			
		||||
 
 | 
			
		||||
@@ -1,26 +0,0 @@
 | 
			
		||||
#compdef _gitignireio git-ignore-template
 | 
			
		||||
#autoload
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# Completes git-ignore-template
 | 
			
		||||
#
 | 
			
		||||
# Authors:
 | 
			
		||||
#   Haojia Che <haojia.che@gmail.com>
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
typeset -A opt_args
 | 
			
		||||
 | 
			
		||||
_arguments -C \
 | 
			
		||||
    '1::ignore:->ignores' \
 | 
			
		||||
&& ret=0
 | 
			
		||||
 | 
			
		||||
list=(`git-ignore-template`)
 | 
			
		||||
 | 
			
		||||
case "$state" in
 | 
			
		||||
    (ignores)
 | 
			
		||||
        languages=(`echo  $list| tr "," "\n"`)
 | 
			
		||||
        _describe 'templates' languages && ret=0
 | 
			
		||||
    ;;
 | 
			
		||||
esac;
 | 
			
		||||
 | 
			
		||||
return 1;
 | 
			
		||||
@@ -1,20 +0,0 @@
 | 
			
		||||
#
 | 
			
		||||
# Get  ignore template from https://gitignore.io.
 | 
			
		||||
#
 | 
			
		||||
# Authors:
 | 
			
		||||
#   Haojia Che <haojia.che@gmail.com>
 | 
			
		||||
#
 | 
			
		||||
#  Use `git-ignore-template` or `git-ignore-template list` to get the list
 | 
			
		||||
#  Uset `git-ignore-template <template name>` to get the template 
 | 
			
		||||
#
 | 
			
		||||
#   Example:
 | 
			
		||||
#   `git-ignore-template java` to get a  gitignore template for java.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
function git-ignore-template() {
 | 
			
		||||
    if [ $@ ]; then
 | 
			
		||||
        curl -L -s https://www.gitignore.io/api/$@;
 | 
			
		||||
    else
 | 
			
		||||
        curl -L -s https://www.gitignore.io/api/list;
 | 
			
		||||
    fi
 | 
			
		||||
}
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
GNU Utility
 | 
			
		||||
===========
 | 
			
		||||
 | 
			
		||||
Provides for the interactive use of GNU utilities on BSD systems.
 | 
			
		||||
Provides for the interactive use of GNU utilities on non-GNU systems.
 | 
			
		||||
 | 
			
		||||
Installing GNU utilities on non-GNU systems in `$PATH` without a prefix, i.e.
 | 
			
		||||
`ls` instead of `gls`, is not recommended since scripts that target other
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,7 @@ if (( $+functions[nvm_version] )); then
 | 
			
		||||
  version="${$(nvm_version)#v}"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [[ "$version" != (none|) ]]; then
 | 
			
		||||
if [[ "$version" == (none|) ]]; then
 | 
			
		||||
  zstyle -s ':prezto:module:node:info:version' format 'version_format'
 | 
			
		||||
  zformat -f version_formatted "$version_format" "v:$version"
 | 
			
		||||
  node_info[version]="$version_formatted"
 | 
			
		||||
 
 | 
			
		||||
@@ -6,13 +6,9 @@
 | 
			
		||||
#   Zeh Rizzatti <zehrizzatti@gmail.com>
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# Load manually installed NVM into the shell session.
 | 
			
		||||
# Load NVM into the shell session.
 | 
			
		||||
if [[ -s "$HOME/.nvm/nvm.sh" ]]; then
 | 
			
		||||
  source "$HOME/.nvm/nvm.sh"
 | 
			
		||||
 | 
			
		||||
# Load package manager installed NVM into the shell session.
 | 
			
		||||
elif (( $+commands[brew] )) && [[ -d "$(brew --prefix nvm 2>/dev/null)" ]]; then
 | 
			
		||||
  source $(brew --prefix nvm)/nvm.sh
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Return if requirements are not found.
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
Perl
 | 
			
		||||
====
 | 
			
		||||
 | 
			
		||||
Enables local [Perl][1] module installation on Mac OS X and defines aliases.
 | 
			
		||||
Enables local [Perl][1] module installation on Mac OS X and defines alises.
 | 
			
		||||
 | 
			
		||||
Local Module Installation
 | 
			
		||||
-------------------------
 | 
			
		||||
 
 | 
			
		||||
@@ -16,14 +16,10 @@ fi
 | 
			
		||||
 | 
			
		||||
_rsync_cmd='rsync --verbose --progress --human-readable --compress --archive --hard-links --one-file-system'
 | 
			
		||||
 | 
			
		||||
if grep -q 'xattrs' <(rsync --help 2>&1); then
 | 
			
		||||
  _rsync_cmd="${_rsync_cmd} --acls --xattrs"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Mac OS X and HFS+ Enhancements
 | 
			
		||||
# http://help.bombich.com/kb/overview/credits#opensource
 | 
			
		||||
if [[ "$OSTYPE" == darwin* ]] && grep -q 'file-flags' <(rsync --help 2>&1); then
 | 
			
		||||
  _rsync_cmd="${_rsync_cmd} --crtimes --fileflags --protect-decmpfs --force-change"
 | 
			
		||||
  _rsync_cmd="${_rsync_cmd} --crtimes --acls --xattrs --fileflags --protect-decmpfs --force-change"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
alias rsync-copy="${_rsync_cmd}"
 | 
			
		||||
 
 | 
			
		||||
@@ -13,14 +13,19 @@ directory, add the following to *zpreztorc*:
 | 
			
		||||
 | 
			
		||||
    zstyle ':prezto:module:terminal' auto-title 'yes'
 | 
			
		||||
 | 
			
		||||
Auto titling is disabled inside terminal multiplexers, except inside dvtm, since
 | 
			
		||||
it interferes with window names defined in configuration files and profile
 | 
			
		||||
managers.
 | 
			
		||||
Auto titling is disabled inside terminal multiplexers (except inside dvtm)
 | 
			
		||||
since it interferes with window names defined in configuration files and
 | 
			
		||||
profile managers. This can be overridden by setting it to `always`.
 | 
			
		||||
 | 
			
		||||
    zstyle ':prezto:module:terminal' auto-title 'always'
 | 
			
		||||
 | 
			
		||||
### Title formats
 | 
			
		||||
 | 
			
		||||
To format terminal window and tab titles, add the following to *zpreztorc*:
 | 
			
		||||
 | 
			
		||||
    zstyle ':prezto:module:terminal:window-title' format '%n@%m: %s'
 | 
			
		||||
    zstyle ':prezto:module:terminal:tab-title' format '%m: %s'
 | 
			
		||||
    zstyle ':prezto:module:terminal:multiplexer-title' format '%s'
 | 
			
		||||
 | 
			
		||||
`%s` will be replaced with the current working directory path or the currently
 | 
			
		||||
executing program name.
 | 
			
		||||
@@ -31,7 +36,8 @@ Functions
 | 
			
		||||
---------
 | 
			
		||||
 | 
			
		||||
- `set-tab-title` sets the terminal tab title.
 | 
			
		||||
- `set-window-title` sets the terminal or terminal multiplexer window title.
 | 
			
		||||
- `set-window-title` sets the terminal window title.
 | 
			
		||||
- `set-multiplexer-title` sets the terminal multiplexer title.
 | 
			
		||||
 | 
			
		||||
Authors
 | 
			
		||||
-------
 | 
			
		||||
@@ -39,6 +45,7 @@ Authors
 | 
			
		||||
*The authors of this module should be contacted via the [issue tracker][2].*
 | 
			
		||||
 | 
			
		||||
  - [Sorin Ionescu](https://github.com/sorin-ionescu)
 | 
			
		||||
  - [Olaf Conradi](https://github.com/oohlaf)
 | 
			
		||||
 | 
			
		||||
[1]: http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Expansion-of-Prompt-Sequences
 | 
			
		||||
[2]: https://github.com/sorin-ionescu/prezto/issues
 | 
			
		||||
 
 | 
			
		||||
@@ -3,6 +3,7 @@
 | 
			
		||||
#
 | 
			
		||||
# Authors:
 | 
			
		||||
#   Sorin Ionescu <sorin.ionescu@gmail.com>
 | 
			
		||||
#   Olaf Conradi <olaf@conradi.org>
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# Return if requirements are not found.
 | 
			
		||||
@@ -10,19 +11,12 @@ if [[ "$TERM" == (dumb|linux|*bsd*) ]]; then
 | 
			
		||||
  return 1
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Sets the terminal or terminal multiplexer window title.
 | 
			
		||||
# Sets the terminal window title.
 | 
			
		||||
function set-window-title {
 | 
			
		||||
  local title_format{,ted}
 | 
			
		||||
  zstyle -s ':prezto:module:terminal:window-title' format 'title_format' || title_format="%s"
 | 
			
		||||
  zformat -f title_formatted "$title_format" "s:$argv"
 | 
			
		||||
 | 
			
		||||
  if [[ "$TERM" == screen* ]]; then
 | 
			
		||||
    title_format="\ek%s\e\\"
 | 
			
		||||
  else
 | 
			
		||||
    title_format="\e]2;%s\a"
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  printf "$title_format" "${(V%)title_formatted}"
 | 
			
		||||
  printf '\e]2;%s\a' "${(V%)title_formatted}"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Sets the terminal tab title.
 | 
			
		||||
@@ -30,8 +24,15 @@ function set-tab-title {
 | 
			
		||||
  local title_format{,ted}
 | 
			
		||||
  zstyle -s ':prezto:module:terminal:tab-title' format 'title_format' || title_format="%s"
 | 
			
		||||
  zformat -f title_formatted "$title_format" "s:$argv"
 | 
			
		||||
  printf '\e]1;%s\a' "${(V%)title_formatted}"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
  printf "\e]1;%s\a" ${(V%)title_formatted}
 | 
			
		||||
# Sets the terminal multiplexer tab title.
 | 
			
		||||
function set-multiplexer-title {
 | 
			
		||||
  local title_format{,ted}
 | 
			
		||||
  zstyle -s ':prezto:module:terminal:multiplexer-title' format 'title_format' || title_format="%s"
 | 
			
		||||
  zformat -f title_formatted "$title_format" "s:$argv"
 | 
			
		||||
  printf '\ek%s\e\\' "${(V%)title_formatted}"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Sets the tab and window titles with a given command.
 | 
			
		||||
@@ -59,8 +60,11 @@ function _terminal-set-titles-with-command {
 | 
			
		||||
    local truncated_cmd="${cmd/(#m)?(#c15,)/${MATCH[1,12]}...}"
 | 
			
		||||
    unset MATCH
 | 
			
		||||
 | 
			
		||||
    set-window-title "$cmd"
 | 
			
		||||
    if [[ "$TERM" == screen* ]]; then
 | 
			
		||||
      set-multiplexer-title "$truncated_cmd"
 | 
			
		||||
    fi
 | 
			
		||||
    set-tab-title "$truncated_cmd"
 | 
			
		||||
    set-window-title "$cmd"
 | 
			
		||||
  fi
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -74,8 +78,11 @@ function _terminal-set-titles-with-path {
 | 
			
		||||
  local truncated_path="${abbreviated_path/(#m)?(#c15,)/...${MATCH[-12,-1]}}"
 | 
			
		||||
  unset MATCH
 | 
			
		||||
 | 
			
		||||
  set-window-title "$abbreviated_path"
 | 
			
		||||
  if [[ "$TERM" == screen* ]]; then
 | 
			
		||||
    set-multiplexer-title "$truncated_path"
 | 
			
		||||
  fi
 | 
			
		||||
  set-tab-title "$truncated_path"
 | 
			
		||||
  set-window-title "$abbreviated_path"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# Do not override precmd/preexec; append to the hook array.
 | 
			
		||||
@@ -110,12 +117,13 @@ then
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# Set up non-Apple terminals.
 | 
			
		||||
if zstyle -t ':prezto:module:terminal' auto-title \
 | 
			
		||||
  && ( ! [[ -n "$STY" || -n "$TMUX" ]] )
 | 
			
		||||
if zstyle -t ':prezto:module:terminal' auto-title 'always' \
 | 
			
		||||
  || (zstyle -t ':prezto:module:terminal' auto-title \
 | 
			
		||||
    && ( ! [[ -n "$STY" || -n "$TMUX" ]] ))
 | 
			
		||||
then
 | 
			
		||||
  # Sets the tab and window titles before the prompt is displayed.
 | 
			
		||||
  # Sets titles before the prompt is displayed.
 | 
			
		||||
  add-zsh-hook precmd _terminal-set-titles-with-path
 | 
			
		||||
 | 
			
		||||
  # Sets the tab and window titles before command execution.
 | 
			
		||||
  # Sets titles before command execution.
 | 
			
		||||
  add-zsh-hook preexec _terminal-set-titles-with-command
 | 
			
		||||
fi
 | 
			
		||||
 
 | 
			
		||||
@@ -143,6 +143,9 @@ zstyle ':prezto:module:prompt' theme 'sorin'
 | 
			
		||||
# Set the tab title format.
 | 
			
		||||
# zstyle ':prezto:module:terminal:tab-title' format '%m: %s'
 | 
			
		||||
 | 
			
		||||
# Set the terminal multiplexer title format.
 | 
			
		||||
# zstyle ':prezto:module:terminal:multiplexer-title' format '%s'
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# Tmux
 | 
			
		||||
#
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user