helpThe GNU Bourne-Again SHell - Support: sr #108899, Arbitrary characters to show vi...

 
 

sr #108899: Arbitrary characters to show vi mode in prompt (patch help)

Submitted by:  M Stefan <mstefan>
Submitted on:  Wed 07 Oct 2015 12:08:47 PM UTC  
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Done
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 13 Nov 2015 04:47:01 PM UTC, comment #1:

bash-4.4 allows arbitrary strings to be used for the mode strings, including escape sequences that can be used to change the prompt color.

Chet Ramey <chet>
Project Administrator
Wed 07 Oct 2015 12:08:47 PM UTC, original submission:

Hey guys,

I've attached a patch that introduces readline variables `prompt-{prefix,suffix}-vi-{insert,normal}-mode', allowing one to customize an arbitrary text to be prepended/appended to the prompt when `show-mode-in-prompt' is enabled. Currently we only have the fixed values of "+" and ":".

This should provide the user with a more visual way of displaying the current mode (such as by adding bold/changing color of prompt); I frequently find myself not knowing which mode I'm in, despite having the hardly-visible "+"/":" prefix.

However, there's an issue with my patch: sometimes, switching from normal to insert mode (such as by pressing cc), messes up the prompt and I need to hit return to have it fixed.
Could someone take a look and point me in the right direction to fix this? Also, could you let me know what steps I should go through to try and have this patch applied? Thanks!

Apologies if this has been posted in the wrong place, as well.

M Stefan <mstefan>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #35089:  vi-prompt.diff added by mstefan (9KiB - text/x-patch)
file #35090:  .inputrc added by mstefan (203B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by chet (Posted a comment)
  • -email is unavailable- added by mstefan (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-11-13 chet StatusNone => Done
    2015-10-07 mstefan Attached File- => Added vi-prompt.diff, #35089
        Attached File- => Added .inputrc, #35090

    Back to the top


    Powered by Savane 3.3