PageRenderTime 45ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/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
  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. String getBshPrompt()
  17. {
  18. if ( bsh != void && bsh.prompt != void )
  19. return bsh.prompt;
  20. else
  21. return "bsh % ";
  22. }