PageRenderTime 734ms CodeModel.GetById 49ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 1ms

/jEdit/tags/jedit-4-2-pre14/bsh/commands/getBshPrompt.bsh

#
Unknown | 24 lines | 22 code | 2 blank | 0 comment | 0 complexity | 1ee4e7c18f4ec86fa8098d68c8a84280 MD5 | raw file
 1/**
 2	Get the value to display for the bsh interactive prompt.
 3	This command checks for the variable bsh.prompt and uses it if set.
 4	else returns "bsh % "
 5	<p/>
 6	Remember that you can override bsh commands simply by defining the method
 7	in your namespace. e.g. the following method displays the current working
 8	directory in your prompt:
 9	<p/>
10	<pre>
11	String getBshPrompt() {
12		return bsh.cwd + " % ";
13	}
14	</pre>
15*/
16
17String getBshPrompt() 
18{
19	if ( bsh != void && bsh.prompt != void )
20		return bsh.prompt;
21	else
22		return "bsh % ";
23}
24