Commit Graph

16 Commits

Author SHA1 Message Date
Ceda EI 5828900a92 [Feature] Add multiline support for right prompt
WISH_RPL (i.e. Right Prompt Lengths), WISH_RIGHT_PS1 are now arrays.
WISH_RPLINE tracks the current line. wish_append_right is called by
wish_append to add to WISH_RIGHT_PS1. If wish_append is called with \n
as text, WISH_RPLINE is incremented. (Current limitation: \n can't be
part of any other string passed to wish_append). Right prompt is now printed
using wish_print_right_prompt which iterates over WISH_RPL and
WISH_RIGHT_PS1. Right prompt size is also calculated in
wish_append_right now.
2019-12-24 19:52:15 +05:30
Ceda EI f8254ba89a Add checks for adding powerline to right prompt 2019-12-22 18:45:07 +05:30
Ceda EI c3fbe4f699 [Feature] Add support for right prompt.
Set WISH_RIGHT_PLUGINS to be displayed on right.
wish_append is stateful now. Appends to WISH_RIGHT_PS1 or WISH_LEFT_PS1
based on WISH_STATE. wish_append also calculates the length of right
prompt. This has the downside that right prompt can't include any text
that expands on PS1. Therefore, a limitation needs to be applied on
plugins to only append text that won't be expanded in PS1. (i.e. no \u,
\h, \w, \W, etc).
2019-12-15 21:46:52 +05:30
Ceda EI 4bed328fa2 Replace tr with parameter expansion. 2019-09-06 22:24:35 +05:30
Ceda EI 886ec3bfaf Refactor wish_append.
Use parameter splitting instead of splitting into array via grep. Speeds
the prompt upto 2x in some cases.
2019-09-06 20:35:29 +05:30
Ceda EI ab5df51c2a Set plain as fallback theme if theme not found. Better variable names. 2019-09-06 19:39:37 +05:30
Ceda EI 2c6c83b826 Replace eval with variable indirection. 2019-09-06 18:05:12 +05:30
Ceda EI 78253e1939 Add WISH_AUTONEWLINE. Adds a newline is the output doesn't end with \n 2019-06-10 16:48:40 +05:30
Ceda EI 17b9782056 Fix RGB Coloring 2019-02-16 18:13:11 +05:30
Ceda EI d5049db176 Add RGB support to wish_append 2019-02-16 17:35:58 +05:30
Ceda EI 0a6695dbce Add wish_append. Change plugins to use it 2019-02-16 13:30:42 +05:30
Ceda EI 313430a48e Add dummy plugin, plain theme, allow plugins to override themes 2019-02-16 12:29:33 +05:30
Ceda EI 3ffefaef74 Add powerline support 2019-02-16 11:04:56 +05:30
Ceda EI 4b36696590 Add main function to generate prompt 2019-02-16 00:16:17 +05:30
Ceda EI 3440f16b56 Wrap init in a function 2019-02-15 19:57:48 +05:30
Ceda EI 30671c610f Add code to source plugins and themes 2019-02-15 19:38:12 +05:30