Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Add configs for prompt character #1

Merged
merged 12 commits into from
Feb 4, 2018
Merged

Conversation

JasonEtco
Copy link
Contributor

@JasonEtco JasonEtco commented Feb 4, 2018

Add some configuration options. To use them, add the following to your config.fish:

# Customize Spacefish
set SPACEFISH_CHAR_PREFIX ""
set SPACEFISH_CHAR_SUFFIX "  "
set SPACEFISH_CHAR_SYMBOL ➜

Copy link
Owner

@matchai matchai left a comment

Choose a reason for hiding this comment

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

Hey Jason!
Thank you for putting in the time to write a PR. I've gone ahead and made some small changes to the docs.
Just the __sf_util_set_default change is needed.

fish_prompt.fish Outdated
# Set defaults
set -q SPACEFISH_CHAR_PREFIX ""
set -q SPACEFISH_CHAR_SYMBOL ➜
set -q SPACEFISH_CHAR_SUFFIX " "
Copy link
Owner

Choose a reason for hiding this comment

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

I've created the __sf_util_set_default fish function that allows you to not override user configs in config.fish.
Could you please swap out these set -q with it?


You have ability to customize or disable specific elements of Spacefish. All options must be overridden in your `config.fish`.

Colors for sections can be [basic colors](https://fishshell.com/docs/current/commands.html#set_color) or [color codes](https://upload.wikimedia.org/wikipedia/commons/1/15/Xterm_256color_chart.svg).
Copy link
Owner

Choose a reason for hiding this comment

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

I went ahead and swapped the docs being linked to with fish-specific ones.
Let me know if you have any questions 😄

fish_prompt.fish Outdated
@@ -12,6 +17,6 @@ function fish_prompt
__sf_section_dir cyan $brwhite magenta red
__sf_section_exec_time $brwhite yellow
echo
echo -e -n -s (set_color $arrow_color) ""
echo -e -n -s (set_color $arrow_color) "$SPACEFISH_CHAR_PREFIX$SPACEFISH_CHAR_SYMBOL$SPACEFISH_CHAR_SUFFIX"
Copy link
Owner

Choose a reason for hiding this comment

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

I would now consider moving the arrow prompt into a separate "char section" fish function, like I have for the other sections to parallel the char section in spaceship.

Feel free to create a new fish function for that, otherwise I'll move this stuff over in the next update.

@matchai
Copy link
Owner

matchai commented Feb 4, 2018

LGTM! 👍
Thank you for the contribution!

@matchai matchai merged commit 0aa72ff into matchai:master Feb 4, 2018
@JasonEtco JasonEtco deleted the add-configs branch February 4, 2018 18:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants