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
28232904
Unverified
Commit
28232904
authored
Aug 13, 2019
by
Marc Cornellà
Committed by
GitHub
Aug 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git-auto-fetch: override zle-line-init only if it exists
parent
49741437
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
git-auto-fetch.plugin.zsh
plugins/git-auto-fetch/git-auto-fetch.plugin.zsh
+14
-6
No files found.
plugins/git-auto-fetch/git-auto-fetch.plugin.zsh
View file @
28232904
...
@@ -18,10 +18,18 @@ function git-auto-fetch {
...
@@ -18,10 +18,18 @@ function git-auto-fetch {
echo
"
${
fg_bold
[red]
}
disabled
${
reset_color
}
"
)
echo
"
${
fg_bold
[red]
}
disabled
${
reset_color
}
"
)
}
}
eval
"override-git-auto-fetch-
$(
declare
-f
zle-line-init
)
"
# Override zle-line-init if it exists
if
((
$+
functions[zle-line-init]
))
;
then
function
zle-line-init
()
{
eval
"override-git-auto-fetch-
$(
declare
-f
zle-line-init
)
"
git-fetch-all
override-git-auto-fetch-zle-line-init
function
zle-line-init
()
{
}
git-fetch-all
override-git-auto-fetch-zle-line-init
}
else
function
zle-line-init
()
{
git-fetch-all
}
fi
zle
-N
zle-line-init
zle
-N
zle-line-init
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