An opinionated Git prompt for Nushell, styled after posh-git
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.
If you're wondering what all of those symbols and colors mean, the posh-git documentation has a full breakdown.
Before you can use panache-git, you will need:
To install panache-git:
-
Read over panache-git.nu - if it's going to run on your system, a little extra caution can't hurt
-
Download
panache-git.nu
git clone https://github.com/ehdevries/panache-git.git ~/.panache-git
-
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
-
In the config file:
- Import the
main
command from thepanache-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 = {|| "" }
- Import the
-
Restart Nushell
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 |
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.
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.
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!
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.