changing the espruino prompt

Posted on
  • Is it possible to change the prompt ">" to something like "hostname>" ?

    Reading the latest reference, I would say no.

    Could this be a feature for next releases ?

  • It's not an option right now, no...

    If you're compiling your own you could change the code though. I think it's in jsinteractive.c.

    However you may hit issues when multi-line editing - my guess is some of that code might expect that the indent is exactly 1 character at the moment :)

  • thanks, found it in the file you mentioned, looks like that:

    jsiConsolePrintChar('>'); // show the prompt 
    
  • From what would you derive the "hostname"? By its definition, Espruino has no hostname connotation... I can though see the idea of Espruino on a ESP8266...

  • Yes, this would be very handy for devices like ESPs, hostname could be the mac or the last part of ip or something else.

  • The challenge with changing it is most likely in how the Web IDE is acting upon. In addition - when connected - the Web IDE would have to harvest this information from the Web IDE host (win, osx, linux,... what-ever box), and transmit it. When Espruino then running and having a wired or wireless IP connection, overwriting / precedence challenges arise... and the variability overwhelms the Web IDE. Something that could work is when the Web IDE talks over IP to Espruino... then the Web IDE could somewhere in the banner display the IP (and a setup defined mapped name) of the connected device.

  • Web IDE: maybe add some information to the icon bar like this


    1 Attachment

    • Bildschirmfoto 2016-02-21 um 10.44.47.JPG
  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

changing the espruino prompt

Posted by Avatar for MaBe @MaBe

Actions