add ':set prompt' command
[ghc-hetmet.git] / ghc / docs / users_guide / ghci.xml
index f4ae5a3..786815d 100644 (file)
@@ -59,7 +59,8 @@ Prelude>
    :set <option> ...          set options
    :set args <arg> ...        set the arguments returned by System.getArgs
    :set prog <progname>       set the value returned by System.getProgName
-
+   :set prompt <prompt>       set the prompt used in GHCi
    :show modules              show the currently loaded modules
    :show bindings             show the current bindings made at the prompt
 
@@ -1096,7 +1097,7 @@ Prelude> :. cmds.ghci
       <varlistentry>
        <term>
           <literal>:set</literal> <literal>args</literal> <replaceable>arg</replaceable> ...
-          <indexterm><primary><literal>:set</literal></primary></indexterm>
+          <indexterm><primary><literal>:set args</literal></primary></indexterm>
         </term>
        <listitem>
          <para>Sets the list of arguments which are returned when the
@@ -1108,7 +1109,7 @@ Prelude> :. cmds.ghci
       <varlistentry>
        <term>
            <literal>:set</literal> <literal>prog</literal> <replaceable>prog</replaceable>
-           <indexterm><primary><literal>:set</literal></primary></indexterm>
+           <indexterm><primary><literal>:set prog</literal></primary></indexterm>
         </term>
        <listitem>
          <para>Sets the string to be returned when the program calls
@@ -1119,6 +1120,19 @@ Prelude> :. cmds.ghci
 
       <varlistentry>
        <term>
+           <literal>:set</literal> <literal>prompt</literal> <replaceable>prompt</replaceable>
+        </term>
+       <listitem>
+         <para>Sets the string to be used as the prompt in GHCi.
+         Inside <replaceable>prompt</replaceable>, the sequence
+         <literal>%s</literal> is replaced by the names of the
+         modules currently in scope, and <literal>%%</literal> is
+         replaced by <literal>%</literal>.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+       <term>
           <literal>:show bindings</literal>
           <indexterm><primary><literal>:show bindings</literal></primary></indexterm>
         </term>