mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-07-01 09:19:25 +00:00
Compare commits
6 Commits
stashes
...
pull/715-g
Author | SHA1 | Date | |
---|---|---|---|
72328d0eed | |||
a14b6e5c31 | |||
d020d34e59 | |||
17a6124b43 | |||
3c47c57c87 | |||
ff0cdd3ed7 |
@ -237,6 +237,7 @@ 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
|
||||
-------
|
||||
@ -332,3 +333,4 @@ 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,3 +179,6 @@ 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'
|
||||
|
26
modules/git/functions/_git-ignore-template
Normal file
26
modules/git/functions/_git-ignore-template
Normal file
@ -0,0 +1,26 @@
|
||||
#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;
|
20
modules/git/functions/git-ignore-template
Normal file
20
modules/git/functions/git-ignore-template
Normal file
@ -0,0 +1,20 @@
|
||||
#
|
||||
# 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 non-GNU systems.
|
||||
Provides for the interactive use of GNU utilities on BSD 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"
|
||||
|
@ -1,7 +1,7 @@
|
||||
Perl
|
||||
====
|
||||
|
||||
Enables local [Perl][1] module installation on Mac OS X and defines alises.
|
||||
Enables local [Perl][1] module installation on Mac OS X and defines aliases.
|
||||
|
||||
Local Module Installation
|
||||
-------------------------
|
||||
|
Reference in New Issue
Block a user