Skip to content

fish_right_prompt: Make it optional#25

Open
fidencio wants to merge 1 commit intooh-my-fish:masterfrom
fidencio:wip/make_displaying_right_prompt_configurable
Open

fish_right_prompt: Make it optional#25
fidencio wants to merge 1 commit intooh-my-fish:masterfrom
fidencio:wip/make_displaying_right_prompt_configurable

Conversation

@fidencio
Copy link
Copy Markdown
Contributor

@fidencio fidencio commented Apr 17, 2022

Allow users to easily decide whether or not the fish_right_prompt
should be displayed.

The current way to do so is creating an empty fish_right_prompt
function in ~/.config/fish/functions/fish_mode_prompt.fish, which
although is very well documented and the default way to do so, is less
handy than having an option on the theme to do so.

Fixes: #24

Signed-off-by: Fabiano Fidêncio fabiano@fidencio.org

Allow users to easily decide whether or not the `fish_right_prompt`
should be displayed.

The current way to do so is creating an empty `fish_right_prompt`
function in `~/.config/fish/functions/fish_mode_prompt.fish`, which
although is very well documented and the default way to do so, is less
handy than having an option on the theme to do so.

Fixes: oh-my-fish#24

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
@fidencio fidencio force-pushed the wip/make_displaying_right_prompt_configurable branch from 9060429 to 415ec2f Compare April 17, 2022 13:17
@fidencio
Copy link
Copy Markdown
Contributor Author

/cc @scorphus

Pablo, I must say I, myself, am not sure about this one. On one hand we have a well documented way to do this globally, on the other hand backing providing a way to do this via the theme allows the users to backup a single configuration file.

I'm totally fine on just closing the PR (and the associated issue) in case this is not the way to proceed.

Copy link
Copy Markdown
Member

@scorphus scorphus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing, @fidencio. Apologies for the delay.

Apropos of the suggestions:

Nit: WDYT of the word "disable" instead of "hide"? "hide" gives the idea that it's being hidden but still computed.

set -g theme_stash_indicator yes
```

Hide the right prompt:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Hide the right prompt:
Disable the right prompt:


Hide the right prompt:
```
set -g theme_hide_right_prompt yes
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
set -g theme_hide_right_prompt yes
set -g theme_disable_right_prompt yes

@@ -1,4 +1,12 @@
# You can override some default options with config.fish:
#
# set -g theme_hide_right_prompt yes
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# set -g theme_hide_right_prompt yes
# set -g theme_disable_right_prompt yes

# set -g theme_hide_right_prompt yes

function fish_right_prompt
if test "$theme_hide_right_prompt" = 'yes'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if test "$theme_hide_right_prompt" = 'yes'
if test "$theme_disable_right_prompt" = 'yes'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make the "right prompt" optional

2 participants