How to customize the look of currently selected(highlighted) completion in zsh?

Clash Royale CLAN TAG#URR8PPP
up vote
3
down vote
favorite
Main question
I would like to add powerline characters at the start and at the end of the selected completion, like this:
Started the completion menu by insertingcand pressing theTABkey.
Moved right in the completion menu by pressing the right arrow key.
Moved down in the completion menu by pressing the down arrow key.
Is there any way to make zsh look/behave like in the pictures?
Note
Added powerline triangle + blank character at the beginning and blank character + powerline triangle at the end should somehow be accounted when columns are created to keep the alignment correct.
Bonus
Add 2 blanks at the beginning of every completion in the list, so that when the completion is selected it doesn't look like the text was moved to the right.
( This issue can be seen by comparing the completion with and without the selection. )
Alternative question
In case that previously explained behavior is impossible to get without changing the zsh source code, is it at least possible to add powerline triangle only at the end of the selected completion?
My unsuccessful attempts
- I have tried using the
lc,rc, andecvariables in thelist-colorsstyle but that didn't help:- Completion list was badly aligned and it created all kinds of visual problems.
- Symbols were inserted in all elements of the completion list, not just the selected one.
- I have also tried using the
mavariable, but I couldn't properly insert a character at the beginning:- The variable expects only a number that represents a color and it is probably wrapped in some escape sequences, so the output did not look as expected.
zsh
add a comment |Â
up vote
3
down vote
favorite
Main question
I would like to add powerline characters at the start and at the end of the selected completion, like this:
Started the completion menu by insertingcand pressing theTABkey.
Moved right in the completion menu by pressing the right arrow key.
Moved down in the completion menu by pressing the down arrow key.
Is there any way to make zsh look/behave like in the pictures?
Note
Added powerline triangle + blank character at the beginning and blank character + powerline triangle at the end should somehow be accounted when columns are created to keep the alignment correct.
Bonus
Add 2 blanks at the beginning of every completion in the list, so that when the completion is selected it doesn't look like the text was moved to the right.
( This issue can be seen by comparing the completion with and without the selection. )
Alternative question
In case that previously explained behavior is impossible to get without changing the zsh source code, is it at least possible to add powerline triangle only at the end of the selected completion?
My unsuccessful attempts
- I have tried using the
lc,rc, andecvariables in thelist-colorsstyle but that didn't help:- Completion list was badly aligned and it created all kinds of visual problems.
- Symbols were inserted in all elements of the completion list, not just the selected one.
- I have also tried using the
mavariable, but I couldn't properly insert a character at the beginning:- The variable expects only a number that represents a color and it is probably wrapped in some escape sequences, so the output did not look as expected.
zsh
add a comment |Â
up vote
3
down vote
favorite
up vote
3
down vote
favorite
Main question
I would like to add powerline characters at the start and at the end of the selected completion, like this:
Started the completion menu by insertingcand pressing theTABkey.
Moved right in the completion menu by pressing the right arrow key.
Moved down in the completion menu by pressing the down arrow key.
Is there any way to make zsh look/behave like in the pictures?
Note
Added powerline triangle + blank character at the beginning and blank character + powerline triangle at the end should somehow be accounted when columns are created to keep the alignment correct.
Bonus
Add 2 blanks at the beginning of every completion in the list, so that when the completion is selected it doesn't look like the text was moved to the right.
( This issue can be seen by comparing the completion with and without the selection. )
Alternative question
In case that previously explained behavior is impossible to get without changing the zsh source code, is it at least possible to add powerline triangle only at the end of the selected completion?
My unsuccessful attempts
- I have tried using the
lc,rc, andecvariables in thelist-colorsstyle but that didn't help:- Completion list was badly aligned and it created all kinds of visual problems.
- Symbols were inserted in all elements of the completion list, not just the selected one.
- I have also tried using the
mavariable, but I couldn't properly insert a character at the beginning:- The variable expects only a number that represents a color and it is probably wrapped in some escape sequences, so the output did not look as expected.
zsh
Main question
I would like to add powerline characters at the start and at the end of the selected completion, like this:
Started the completion menu by insertingcand pressing theTABkey.
Moved right in the completion menu by pressing the right arrow key.
Moved down in the completion menu by pressing the down arrow key.
Is there any way to make zsh look/behave like in the pictures?
Note
Added powerline triangle + blank character at the beginning and blank character + powerline triangle at the end should somehow be accounted when columns are created to keep the alignment correct.
Bonus
Add 2 blanks at the beginning of every completion in the list, so that when the completion is selected it doesn't look like the text was moved to the right.
( This issue can be seen by comparing the completion with and without the selection. )
Alternative question
In case that previously explained behavior is impossible to get without changing the zsh source code, is it at least possible to add powerline triangle only at the end of the selected completion?
My unsuccessful attempts
- I have tried using the
lc,rc, andecvariables in thelist-colorsstyle but that didn't help:- Completion list was badly aligned and it created all kinds of visual problems.
- Symbols were inserted in all elements of the completion list, not just the selected one.
- I have also tried using the
mavariable, but I couldn't properly insert a character at the beginning:- The variable expects only a number that represents a color and it is probably wrapped in some escape sequences, so the output did not look as expected.
zsh
asked May 9 at 19:44
Iskustvo
667118
667118
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f442850%2fhow-to-customize-the-look-of-currently-selectedhighlighted-completion-in-zsh%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password