donnemartin / gitsome

A supercharged Git/GitHub command line interface (CLI). An official integration for GitHub and GitHub Enterprise: https://github.com/works-with/category/desktop-tools
Other
7.59k stars 439 forks source link

customize prompt #65

Open cj opened 8 years ago

cj commented 8 years ago

what would be the best way to customize the prompt, including changing the color scheme?

donnemartin commented 8 years ago

Thanks for the feature request. Currently, this isn't something the user can configure.

leoj3n commented 8 years ago

Solarized Light looks like this:

image

Still useable but not very pretty.

arpit1997 commented 8 years ago

I try to go through the code and found some hints about this. I need some reviews about my opinions

In config.py function def _init_colors(self):


    def _init_colors(self):
        """Initialize colors to their defaults."""
        self.clr_primary = None
        self.clr_secondary = 'green'
        self.clr_tertiary = 'cyan'
        self.clr_quaternary = 'yellow'
        self.clr_bold = 'cyan'
        self.clr_code = 'cyan'
        self.clr_error = 'red'
        self.clr_header = 'yellow'
        self.clr_link = 'green'
        self.clr_list = 'cyan'
        self.clr_message = None
        ...................................

we can put a json file containing user defined colours for the cli and then load this in the function mentioned above, so user can modify however he/she wants. Anyone review and comment on this :smile:

donnemartin commented 8 years ago

@arpit1997, you can change those colors already, please check out customizable-highlighting.

I think the discussion on changing the prompt is related to this section of the code. I'd like to try to fix this as part of the xonsh dependency ticket.