Skip to content

Commit

Permalink
Merge pull request #1010 from UV-CDAT/issue_1009_horrible_prompt
Browse files Browse the repository at this point in the history
Issue 1009 horrible prompt
  • Loading branch information
aashish24 committed Feb 5, 2015
2 parents b7aada3 + 78ec3bf commit 60b5589
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
8 changes: 8 additions & 0 deletions CMake/cdat_modules_extra/setup_runtime.csh.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Main install prefix set by user or post install script:
# UVCDAT_INSTALL_PREFIX

setenv UVCDAT_PROMPT_STRING @UVCDAT_PROMPT_STRING@
if ( $?UVCDAT_PROMPT_BEGINNING ) then
set prompt = "[@UVCDAT_PROMPT_STRING@]${prompt}"
endif
if ( $?UVCDAT_PROMPT_END ) then
set prompt = "${prompt}[@UVCDAT_PROMPT_STRING@]"
endif

# If unset, use the value configured by cmake by default.
# Everything beyond this point will be determined relatively
# from this path.
Expand Down
8 changes: 6 additions & 2 deletions CMake/cdat_modules_extra/setup_runtime.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,12 @@ library_paths=( @SETUP_LIBRARY_PATHS@ )
python_paths=( @SETUP_PYTHON_PATHS@ )
executable_paths=( @SETUP_EXECUTABLE_PATHS@ )

if [ -z "$UVCDAT_DISABLE_PROMPT" ] ; then
export PS1="(uvcdat)$PS1"
export UVCDAT_PROMPT_STRING=@UVCDAT_PROMPT_STRING@
if [ "$UVCDAT_ENABLE_PROMPT_BEGINNING" ] ; then
export PS1="[@UVCDAT_PROMPT_STRING@]$PS1"
fi
if [ "$UVCDAT_ENABLE_PROMPT_END" ] ; then
export PS1="$PS1[@UVCDAT_PROMPT_STRING@]"
fi

if [ -d '@QT_LIB_DIR@' ] ; then
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ project(cdat)
# Set cdat and cmake variables
#-----------------------------------------------------------------------------
set(LLNL_URL http://uv-cdat.llnl.gov/cdat/resources)

set(cdat_CMAKE_SOURCE_DIR ${cdat_SOURCE_DIR}/CMake)
set(cdat_CMAKE_BINARY_DIR ${cdat_BINARY_DIR}/CMake)
set(cdat_external_patch_dir ${cdat_SOURCE_DIR}/exsrc)
Expand Down Expand Up @@ -684,7 +683,8 @@ set(SETUP_PYTHON_PATHS
"lib/python${PYVER}/site-packages "
)
string(REPLACE ";" " " SETUP_PYTHON_PATHS ${SETUP_PYTHON_PATHS})

include(GetGitRevisionDescription)
git_describe(UVCDAT_PROMPT_STRING)
configure_file(${cdat_CMAKE_SOURCE_DIR}/cdat_modules_extra/install.py.in
${cdat_SOURCE_DIR}/installation/install.py
@ONLY
Expand Down

0 comments on commit 60b5589

Please sign in to comment.