Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-18065

Prompt ANSI escapes not working

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 3.0.2
    • Component/s: Shell
    • Labels:
      None
    • ALL

      Currently is not possible to use ANSI escapes in prompt.

      prompt = function(){
        csi = String.fromCharCode(0x1b) + '[';
        reset = csi + '0m';
        return '{0}db{1}'.format(csi + '44m', reset);
      }
      

      Will produce prompt like:

      [44mdb[0m
      

      I'm not sure if it's desired behavior for shell prompt. It would be nice if users could use color for shell prompt cusomization

            Assignee:
            ramon.fernandez@mongodb.com Ramon Fernandez Marina
            Reporter:
            dmgening Dmitry Gening
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: