Fixed and activated prompt_isabelle_env.
This commit is contained in:
parent
385668f407
commit
abb5fa42fc
|
@ -89,20 +89,24 @@ prompt_dir() {
|
||||||
|
|
||||||
|
|
||||||
# Prompt: Isabelle Version
|
# Prompt: Isabelle Version
|
||||||
ISAVERSIONCMD="Isabelle version | sed -e 's/:.*//' -e 's/Isabelle//'"
|
isa_version_cmd (){
|
||||||
ISAVERSIONDIR="which isabelle | sed -e 's/.*Isabelle//' -e 's/.bin.*//'"
|
echo `Isabelle version | sed -e 's/:.*//' -e 's/Isabelle//'`
|
||||||
prompt_isabellenv() {
|
}
|
||||||
|
isa_version_dir() {
|
||||||
|
echo `which isabelle | sed -e 's/.*Isabelle//' -e 's/.bin.*//'`
|
||||||
|
}
|
||||||
|
prompt_isabelle_env() {
|
||||||
ISADIR=false
|
ISADIR=false
|
||||||
if [[ -f ROOT || -f ROOTS ]]; then
|
if [[ -f ROOT || -f ROOTS ]]; then
|
||||||
ISARDIR=true
|
ISADIR=true
|
||||||
else
|
else
|
||||||
if (){ setopt localoptions nonomatch nocshnullglob; [ -f *.thy([1]) ] }
|
if (){ setopt localoptions nonomatch nocshnullglob; [ -f *.thy([1]) ] }
|
||||||
then
|
then
|
||||||
ISARDIR=true
|
ISADIR=true
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ "ISADIR" = true ]; then
|
if [ "$ISADIR" = true ]; then
|
||||||
prompt_segment $1 $2 "(Isabelle `$ISAVERSION`)"
|
prompt_segment $1 $2 "(Isabelle $( $ISAVERSION ))"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,6 +116,7 @@ build_prompt() {
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
prompt_logo $LHORANGE black
|
prompt_logo $LHORANGE black
|
||||||
prompt_dir $LHLIGHTORANGE black
|
prompt_dir $LHLIGHTORANGE black
|
||||||
|
prompt_isabelle_env $LHCYAN black
|
||||||
prompt_end
|
prompt_end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,6 +124,7 @@ build_inactive_prompt() {
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
prompt_logo $LHDARKGRAY white
|
prompt_logo $LHDARKGRAY white
|
||||||
prompt_dir $LHLIGHTGRAY white
|
prompt_dir $LHLIGHTGRAY white
|
||||||
|
prompt_isabelle_env $LHLIGHTGRAY black
|
||||||
prompt_end
|
prompt_end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,17 +145,19 @@ INACTIVEPROMPT='%{%f%b%k%}$(build_inactive_prompt) '
|
||||||
|
|
||||||
# Default configuration
|
# Default configuration
|
||||||
SEGMENT_SEPARATOR=$PL_BRARROW
|
SEGMENT_SEPARATOR=$PL_BRARROW
|
||||||
ISAVERSION=$ISAVERSIONDIR
|
ISAVERSION=isa_version_dir
|
||||||
|
|
||||||
if [[ "$TERM" =~ ".*256.*" ]]; then
|
if [[ "$TERM" =~ ".*256.*" ]]; then
|
||||||
LHORANGE="166"
|
LHORANGE="166"
|
||||||
LHLIGHTORANGE="172"
|
LHLIGHTORANGE="172"
|
||||||
LHDARKGRAY="235"
|
LHDARKGRAY="235"
|
||||||
LHLLIGHTGRAY="008"
|
LHLLIGHTGRAY="008"
|
||||||
|
LHCYAN="014"
|
||||||
else
|
else
|
||||||
LHORANGE="058"
|
LHORANGE="058"
|
||||||
LHLIGHTORANGE="016"
|
LHLIGHTORANGE="016"
|
||||||
LHDARKGRAY="019"
|
LHDARKGRAY="019"
|
||||||
LHLLIGHTGRAY="008"
|
LHLLIGHTGRAY="008"
|
||||||
|
LHCYAN="014"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue