Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
229a1c97
Commit
229a1c97
authored
Sep 08, 2019
by
Prajjwal Singh
Committed by
Marc Cornellà
Sep 08, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gitfast: update completions (#8130)
Includes completions for `git switch`.
parent
101ea872
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
604 additions
and
766 deletions
+604
-766
_git
plugins/gitfast/_git
+13
-6
git-completion.bash
plugins/gitfast/git-completion.bash
+591
-760
No files found.
plugins/gitfast/_git
View file @
229a1c97
...
...
@@ -30,7 +30,7 @@ if [ -z "$script" ]; then
local -a locations
local e
locations=(
"$(dirname ${funcsourcetrace[1]%:*})/git-completion.bash"
$(dirname ${funcsourcetrace[1]%:*})/git-completion.bash
'/etc/bash_completion.d/git' # fedora, old debian
'/usr/share/bash-completion/completions/git' # arch, ubuntu, new debian
'/usr/share/bash-completion/git' # gentoo
...
...
@@ -39,7 +39,7 @@ if [ -z "$script" ]; then
test -f $e && script="$e" && break
done
fi
ZSH_VERSION=''
. "$script"
GIT_SOURCING_ZSH_COMPLETION=y
. "$script"
__gitcomp ()
{
...
...
@@ -93,13 +93,22 @@ __gitcomp_nl_append ()
compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0
}
__gitcomp_file_direct ()
{
emulate -L zsh
local IFS=$'\n'
compset -P '*[=:]'
compadd -f -- ${=1} && _ret=0
}
__gitcomp_file ()
{
emulate -L zsh
local IFS=$'\n'
compset -P '*[=:]'
compadd -
Q -
p "${2-}" -f -- ${=1} && _ret=0
compadd -p "${2-}" -f -- ${=1} && _ret=0
}
__git_zsh_bash_func ()
...
...
@@ -223,10 +232,8 @@ _git ()
if (( $+functions[__${service}_zsh_main] )); then
__${service}_zsh_main
el
if (( $+functions[__${service}_main] )); then
el
se
emulate ksh -c __${service}_main
elif (( $+functions[_${service}] )); then
emulate ksh -c _${service}
fi
let _ret && _default && _ret=0
...
...
plugins/gitfast/git-completion.bash
View file @
229a1c97
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment