/jEdit/tags/jedit-4-5-pre1/org/gjt/sp/jedit/bsh/commands/getBshPrompt.bsh
Unknown | 24 lines | 22 code | 2 blank | 0 comment | 0 complexity | 1ee4e7c18f4ec86fa8098d68c8a84280 MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
- /**
- Get the value to display for the bsh interactive prompt.
- This command checks for the variable bsh.prompt and uses it if set.
- else returns "bsh % "
- <p/>
- Remember that you can override bsh commands simply by defining the method
- in your namespace. e.g. the following method displays the current working
- directory in your prompt:
- <p/>
- <pre>
- String getBshPrompt() {
- return bsh.cwd + " % ";
- }
- </pre>
- */
- String getBshPrompt()
- {
- if ( bsh != void && bsh.prompt != void )
- return bsh.prompt;
- else
- return "bsh % ";
- }