Minor edits - add a few input checks, remove a few commented pieces of debug code, add a few brackets, etc.

darcs-hash:20070115175144-ac50b-2045f2132156645222e6dde57487aa299a5316e2.gz
This commit is contained in:
axel
2007-01-16 03:51:44 +10:00
parent c6ebb23f38
commit cb7caf2afc
5 changed files with 160 additions and 115 deletions

View File

@@ -115,6 +115,8 @@ commence.
*/
#define DEFAULT_PROMPT L"whoami; echo @; hostname|cut -d . -f 1; echo \" \"; pwd; printf '> ';"
#define PROMPT_FUNCTION_NAME L"fish_prompt"
/**
The default title for the reader. This is used by reader_readline.
*/
@@ -1910,8 +1912,8 @@ static int read_i()
{
wchar_t *tmp;
if( function_exists( L"fish_prompt" ) )
reader_set_prompt( L"fish_prompt" );
if( function_exists( PROMPT_FUNCTION_NAME ) )
reader_set_prompt( PROMPT_FUNCTION_NAME );
else
reader_set_prompt( DEFAULT_PROMPT );