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
582c8cb2
Unverified
Commit
582c8cb2
authored
May 20, 2020
by
Jacob Menke
Committed by
GitHub
May 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prefix cd calls with `builtin` (#8937)
parent
8b51d17c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
cli.zsh
lib/cli.zsh
+4
-4
diagnostics.zsh
lib/diagnostics.zsh
+4
-4
oh-my-zsh.sh
oh-my-zsh.sh
+1
-1
No files found.
lib/cli.zsh
View file @
582c8cb2
...
...
@@ -103,7 +103,7 @@ EOF
function
_omz::pr::clean
{
(
set
-e
cd
-q
"
$ZSH
"
builtin
cd
-q
"
$ZSH
"
_omz::log info
"removing all Oh My Zsh Pull Request branches..."
command
git branch
--list
'ohmyzsh/pull-*'
|
while
read
branch
;
do
...
...
@@ -126,7 +126,7 @@ function _omz::pr::test {
# Save current git HEAD
local
branch
branch
=
$(
cd
-q
"
$ZSH
"
;
git symbolic-ref
--short
HEAD
)
||
{
branch
=
$(
builtin
cd
-q
"
$ZSH
"
;
git symbolic-ref
--short
HEAD
)
||
{
_omz::log error
"error when getting the current git branch. Aborting..."
return
1
}
...
...
@@ -136,7 +136,7 @@ function _omz::pr::test {
# If any of these operations fail, undo the changes made
(
set
-e
cd
-q
"
$ZSH
"
builtin
cd
-q
"
$ZSH
"
# Get the ohmyzsh git remote
command
git remote
-v
|
while
read
remote url _
;
do
...
...
@@ -185,7 +185,7 @@ function _omz::pr::test {
(
set
-e
cd
-q
"
$ZSH
"
builtin
cd
-q
"
$ZSH
"
command
git checkout
"
$branch
"
--
||
{
_omz::log error
"could not go back to the previous branch ('
$branch
')."
...
...
lib/diagnostics.zsh
View file @
582c8cb2
...
...
@@ -192,19 +192,19 @@ function _omz_diag_dump_one_big_text() {
command ls
-ld
~/.oh
*
builtin echo
builtin echo
oh-my-zsh git state:
(
cd
$ZSH
&&
builtin echo
"HEAD:
$(
git rev-parse HEAD
)
"
&&
git remote
-v
&&
git status |
command grep
"[^[:space:]]"
)
(
builtin
cd
$ZSH
&&
builtin echo
"HEAD:
$(
git rev-parse HEAD
)
"
&&
git remote
-v
&&
git status |
command grep
"[^[:space:]]"
)
if
[[
$verbose
-ge
1
]]
;
then
(
cd
$ZSH
&&
git reflog
--date
=
default |
command grep
pull
)
(
builtin
cd
$ZSH
&&
git reflog
--date
=
default |
command grep
pull
)
fi
builtin echo
if
[[
-e
$ZSH_CUSTOM
]]
;
then
local
custom_dir
=
$ZSH_CUSTOM
if
[[
-h
$custom_dir
]]
;
then
custom_dir
=
$(
cd
$custom_dir
&&
pwd
-P
)
custom_dir
=
$(
builtin
cd
$custom_dir
&&
pwd
-P
)
fi
builtin echo
"oh-my-zsh custom dir:"
builtin echo
"
$ZSH_CUSTOM
(
$custom_dir
)"
(
cd
${
custom_dir
:h
}
&&
command
find
${
custom_dir
:t
}
-name
.git
-prune
-o
-print
)
(
builtin
cd
${
custom_dir
:h
}
&&
command
find
${
custom_dir
:t
}
-name
.git
-prune
-o
-print
)
builtin echo
fi
...
...
oh-my-zsh.sh
View file @
582c8cb2
...
...
@@ -63,7 +63,7 @@ fi
# Construct zcompdump OMZ metadata
zcompdump_metadata
=
"
\
#omz revision:
$(
cd
-q
"
$ZSH
"
;
git rev-parse HEAD 2>/dev/null
)
#omz revision:
$(
builtin
cd
-q
"
$ZSH
"
;
git rev-parse HEAD 2>/dev/null
)
#omz fpath:
$fpath
\
"
...
...
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