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

Prompt ANSI escapes not working

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • 3.0.2
    • Shell
    • None
    • ALL

    Description

      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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: