Permalink
Browse files

Allow SetPrompt to replace continuation label as well.

  • Loading branch information...
1 parent ded0e2f commit a4ce7f91e6b5e79a675ff6e1de37ff7adb952c6e @arthuredelstein arthuredelstein committed Jan 22, 2013
Showing with 10 additions and 5 deletions.
  1. +4 −2 README.md
  2. +6 −3 jqconsole.coffee
View
6 README.md
@@ -285,13 +285,15 @@ Sets the text currently in the input prompt. Takes one parameter:
###jqconsole.SetPromptLabel
-Replaces the main prompt label.
+Replaces the main prompt label. Takes two parameters:
- * __string__ *label*: String to replace the main promot label.
+ * __string__ *main_label*: String to replace the main prompt label.
+ * __string__ *continuation_label*: String to replace the continuation prompt label. Optional.
Examples:
jqconsole.SetPromptLabel('$')
+ jqconsole.SetPromptLabel(' $','..')
###jqconsole.ClearPromptText
View
9 jqconsole.coffee
@@ -417,9 +417,12 @@ class JQConsole
return undefined
# Replaces the main prompt label.
- # @arg label: The new label for the next prompt.
- SetPromptLabel: (label) ->
- @prompt_label_main = label
+ # @arg main_label: The new main label for the next prompt.
+ # @arg continue_label: The new continuation label for the next prompt. Optional.
+ SetPromptLabel: (main_label, continue_label) ->
+ @prompt_label_main = main_label
+ if continue_label?
+ @prompt_label_continue = continue_label
return undefined
# Writes the given text to the console in a <span>, with an optional class.

0 comments on commit a4ce7f9

Please sign in to comment.