mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
Added support for Haskell projects.
This commit is contained in:
parent
20f0afde7c
commit
d821ae6b99
1 changed files with 8 additions and 1 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
PROMPT='$(python_version)$(rvm_ruby) %{$fg_bold[green]%}$(current_dir) %{$fg_bold[cyan]%}$(git_time_since_commit)$(git_prompt_info)%{$fg_bold[blue]%}%{$reset_color%}'
|
PROMPT='$(haskell_version)$(python_version)$(rvm_ruby) %{$fg_bold[green]%}$(current_dir) %{$fg_bold[cyan]%}$(git_time_since_commit)$(git_prompt_info)%{$fg_bold[blue]%}%{$reset_color%}'
|
||||||
|
|
||||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[green]%}"
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[green]%}"
|
||||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||||
|
|
@ -15,6 +15,13 @@ function current_dir() {
|
||||||
echo "%~"
|
echo "%~"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function haskell_version() {
|
||||||
|
if [[ -x "`which ghci`" && ( "`ls`" == *.hs* || "`ls`" == *.cabal* ) ]]; then
|
||||||
|
out="`python -c "import sys; print sys.argv[-1]" \`ghci --version\``"
|
||||||
|
echo "%{$fg[red]%}‹ghci-$out›%{$reset_color%}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function python_version() {
|
function python_version() {
|
||||||
# FIXME python --version # doesn't work since x=`python --version` is not
|
# FIXME python --version # doesn't work since x=`python --version` is not
|
||||||
# capturing the thing
|
# capturing the thing
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue