Open acgtyrant opened 8 years ago
I like the idea, #83 (vim mode marker) would work great with this. But I think there are few things we can improve.
rprompt_host
and rprompt_user
so they have r
prefix? I guess they would work just fine as a left?
I guess we can make all of prompt_
functions generic enough to be correct in left and right. It would combine beautifully with #115 Ability to reorder segments, as user could decide which segment he/she wants on left and which on right.SEGMENT_SEPARATOR
is good idea. As you can see prompt_segment
takes the BG and FG as an input parameters an I guess we can pass also separator as parameter. But this would complicate the generic ability of prompt_
functions. Something to thing about.@dawikur Sorry for my procrastination. Let me reply:
Actually I do not add newline before RPROMPT explicitly, I do not know why is it below the line of PROMPT.
You are right, I will remove the 'r' prefix later.
Personally, I would like to handle the state of leftness/rightness in SEGMENT_SEPARATOR
, rather than change all prompt_
functions...
Isn't new line between Left and RIght from
[[ $BULLETTRAIN_PROMPT_SEPARATE_LINE == true ]] && PROMPT="$PROMPT$NEWLINE"
?
@acgtyrant #125 was merged, can you maybe use similar approach in your changes?
@acgtyrant Any update on this?
@dawikur Sorry, I will update in weekend...
I think it would be great if each segment can have $BULLETTRAIN_*_PLACE
option.
for example
BULLETTRAIN_STATUS_PLACE='left' # or 0 - left; 1 - right
https://github.com/bhilburn/powerlevel9k may help for strategy. It looks good too.
Can we refresh this PR?
@acgtyrant can you update your PR to changes introduced in #188?
I add a simple
build_rprompt
function and two rprompt about user and host.I think
RPROMPT
is suitable to place user and host these stable information while thePROMPT
hold those info which change frequently. So I would advice you to remove theCONTEXT
components.Here is the demo.