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
e7390a86
Unverified
Commit
e7390a86
authored
Dec 26, 2021
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jenv): quote % in `jenv_prompt_info`
parent
42afa6e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
jenv.plugin.zsh
plugins/jenv/jenv.plugin.zsh
+8
-2
No files found.
plugins/jenv/jenv.plugin.zsh
View file @
e7390a86
...
@@ -18,13 +18,19 @@ if [[ $FOUND_JENV -eq 1 ]]; then
...
@@ -18,13 +18,19 @@ if [[ $FOUND_JENV -eq 1 ]]; then
((
$+
commands[jenv]
))
||
export
PATH
=
"
${
jenvdir
}
/bin:
$PATH
"
((
$+
commands[jenv]
))
||
export
PATH
=
"
${
jenvdir
}
/bin:
$PATH
"
eval
"
$(
jenv init - zsh
)
"
eval
"
$(
jenv init - zsh
)
"
function
jenv_prompt_info
()
{
jenv version-name 2>/dev/null
}
function
jenv_prompt_info
()
{
local
version
=
"
$(
jenv version-name 2>/dev/null
)
"
echo
"
${
version
:gs/%/%%
}
"
}
if
[[
-d
"
${
jenvdir
}
/versions"
]]
;
then
if
[[
-d
"
${
jenvdir
}
/versions"
]]
;
then
export
JENV_ROOT
=
$jenvdir
export
JENV_ROOT
=
$jenvdir
fi
fi
else
else
function
jenv_prompt_info
()
{
echo
"system:
$(
java
-version
2>&1 |
cut
-f
2
-d
' '
)
"
}
function
jenv_prompt_info
()
{
local
version
=
"
$(
java
-version
2>&1 |
cut
-d
' '
-f2
)
"
echo
"system:
${
version
:gs/%/%%
}
"
}
fi
fi
unset
jenvdir jenvdirs FOUND_JENV
unset
jenvdir jenvdirs FOUND_JENV
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