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
deb08a76
Commit
deb08a76
authored
Mar 08, 2014
by
Robby Russell
Browse files
Options
Browse Files
Download
Plain Diff
Merge conflicts with af-magic theme
parents
22088545
b0b79e0a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
10 deletions
+33
-10
prompt_info_functions.zsh
lib/prompt_info_functions.zsh
+33
-0
rbenv.zsh
lib/rbenv.zsh
+0
-2
rvm.zsh
lib/rvm.zsh
+0
-8
No files found.
lib/prompt_info_functions.zsh
0 → 100644
View file @
deb08a76
# *_prompt_info functions for usage in your prompt
#
# Plugin creators, please add your *_prompt_info function to the list
# of dummy implementations to help theme creators not receiving errors
# without the need of implementing conditional clauses.
#
# See also lib/bzr.zsh, lib/git.zsh and lib/nvm.zsh for
# git_prompt_info, bzr_prompt_info and nvm_prompt_info
# Dummy implementations that return false to prevent command_not_found
# errors with themes, that implement these functions
# Real implementations will be used when the respective plugins are loaded
function
chruby_prompt_info hg_prompt_info pyenv_prompt_info
\
rbenv_prompt_info svn_prompt_info vi_mode_prompt_info
\
virtualenv_prompt_info
{
return
1
}
# oh-my-zsh supports an rvm prompt by default
# get the name of the rvm ruby version
function
rvm_prompt_info
()
{
[
-f
$HOME
/.rvm/bin/rvm-prompt
]
||
return
1
local
rvm_prompt
rvm_prompt
=
$(
$HOME
/.rvm/bin/rvm-prompt
${
=ZSH_THEME_RVM_PROMPT_OPTIONS
}
2>/dev/null
)
[[
"
${
rvm_prompt
}
x"
==
"x"
]]
&&
return
1
echo
"
${
ZSH_THEME_RVM_PROMPT_PREFIX
:
=(
}${
rvm_prompt
}${
ZSH_THEME_RVM_PROMPT_SUFFIX
:
=)
}
"
}
# use this to enable users to see their ruby version, no matter which
# version management system they use
function
ruby_prompt_info
()
{
echo
$(
rvm_prompt_info
||
rbenv_prompt_info
||
chruby_prompt_info
)
}
lib/rbenv.zsh
deleted
100644 → 0
View file @
22088545
# using the rbenv plugin will override this with a real implementation
function
rbenv_prompt_info
()
{}
lib/rvm.zsh
deleted
100644 → 0
View file @
22088545
# get the name of the ruby version
function
rvm_prompt_info
()
{
[
-f
$HOME
/.rvm/bin/rvm-prompt
]
||
return
local
rvm_prompt
rvm_prompt
=
$(
$HOME
/.rvm/bin/rvm-prompt
${
ZSH_THEME_RVM_PROMPT_OPTIONS
}
2>/dev/null
)
[[
"
${
rvm_prompt
}
x"
==
"x"
]]
&&
return
echo
"
${
ZSH_THEME_RVM_PROMPT_PREFIX
:
=(
}${
rvm_prompt
}${
ZSH_THEME_RVM_PROMPT_SUFFIX
:
=)
}
"
}
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