Skip to content

An opinionated Git prompt for Nushell, styled after posh-git

License

Notifications You must be signed in to change notification settings

ehdevries/panache-git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

panache-git

An opinionated Git prompt for Nushell, styled after posh-git

What is this?

panache-git is a shell prompt for Nushell that briefly summarizes the current status of your Git repository. It seeks to emulate the default prompt design of posh-git, an excellent Git prompt and completion engine for PowerShell.

prompt with hints

If you're wondering what all of those symbols and colors mean, the posh-git documentation has a full breakdown.

How do I install it?

Before you can use panache-git, you will need:

To install panache-git:

  1. Read over panache-git.nu - if it's going to run on your system, a little extra caution can't hurt

  2. Download panache-git.nu

    git clone https://github.com/ehdevries/panache-git.git ~/.panache-git
  3. Open your Nushell environment config file

    config env         # with your default editor
    # or #
    code $nu.env-path  # with a specific editor, VS Code in this case
  4. In the config file:

    • Import the main command from the panache-git.nu module file
    • Set panache-git as your prompt command
    • Disable the separate prompt indicator by setting it to an empty string
    use ~/.panache-git/panache-git.nu main
    $env.PROMPT_COMMAND = {|| panache-git }
    $env.PROMPT_INDICATOR = {|| "" }
  5. Restart Nushell

How is this different from posh-git?

posh-git panache-git
Informative and attractive Git prompt Informative and attractive Git prompt
Only works with PowerShell Only works with Nushell
Cross-platform (with PowerShell Core 6+) Cross-platform
Highly configurable Opinionated (the nice way of saying "not configurable")
Tab-completion for Git commands and branch names No completions, although Nushell itself has built-in support for custom completions

Why?

Nushell is a delightful and exciting new kind of shell. posh-git is a fantastic Git prompt, but it's exclusive to PowerShell. panache-git is for posh-git fans who want to dive into Nushell but don't want to leave behind the Git prompt they know.

... and the name?

Imagine starting with "posh-git" and squeezing "nu" into the middle of the first word - you'd get something like "po-nu-sh-git". Now say that out loud a few times. Pretty soon, it starts to sound like "panache-git".

Also, "panache" is a fun word with an amusing history.

Give a dash of style to your shell prompt.

It's not working :-(

If you encounter a problem with panache-git, the first step is to make sure you've installed the latest version of Nushell. Nushell is pre-release software and may introduce breaking changes at any time.

If you continue to encounter the problem after updating, please open an issue - finding bugs is much appreciated!

Thank you

panache-git owes a debt of gratitude to a number of wonderful open-source projects - in particular:

If you like this project, consider giving those other projects some love.

About

An opinionated Git prompt for Nushell, styled after posh-git

Resources

License

Stars

Watchers

Forks

Packages

No packages published