โ˜„๐ŸŒŒ๏ธ The minimal, blazing-fast, and infinitely customizable prompt for any shell

Last update: May 19, 2022

Starship โ€“ Cross-shell prompt

GitHub Actions workflow status Crates.io version Packaging status
Chat on Discord Follow @StarshipPrompt on Twitter

Website ยท Installation ยท Configuration

English   Deutsch   Espaรฑol   Franรงais   Bahasa Indonesia   Italiano   ๆ—ฅๆœฌ่ชž   Portuguรชs do Brasil   ะ ัƒััะบะธะน   Tiแบฟng Viแป‡t   ็ฎ€ไฝ“ไธญๆ–‡   ็น้ซ”ไธญๆ–‡

Starship with iTerm2 and the Snazzy theme

The minimal, blazing-fast, and infinitely customizable prompt for any shell!

  • Fast: it's fast โ€“ really really fast! ๐Ÿš€
  • Customizable: configure every aspect of your prompt.
  • Universal: works on any shell, on any operating system.
  • Intelligent: shows relevant information at a glance.
  • Feature rich: support for all your favorite tools.
  • Easy: quick to install โ€“ start using it in minutes.

Explore the Starship docs   โ–ถ

๐Ÿš€ Installation

Prerequisites

Step 1. Install Starship

Select your operating system from the list below to view installation instructions:

Android

Install Starship using any of the following package managers:

Repository Instructions
Termux pkg install starship
BSD

Install Starship using any of the following package managers:

Distribution Repository Instructions
Any crates.io cargo install starship --locked
FreeBSD FreshPorts pkg install starship
NetBSD pkgsrc pkgin install starship
Linux

Install the latest version for your system:

sh -c "$(curl -fsSL https://starship.rs/install.sh)"

Alternatively, install Starship using any of the following package managers:

Distribution Repository Instructions
Any crates.io cargo install starship --locked
Any conda-forge conda install -c conda-forge starship
Any Linuxbrew brew install starship
Any Snapcraft snap install starship
Alpine Linux 3.13+ Alpine Linux Packages apk add starship
Arch Linux Arch Linux Community pacman -S starship
CentOS 7+ Copr dnf copr enable atim/starship
dnf install starship
Fedora 31+ Fedora Packages dnf install starship
NixOS nixpkgs nix-env -iA nixos.starship
Gentoo Gentoo Packages emerge app-shells/starship
Manjaro pacman -S starship
NixOS nixpkgs nix-env -iA nixpkgs.starship
Void Linux Void Linux Packages xbps-install -S starship
macOS

Install the latest version for your system:

sh -c "$(curl -fsSL https://starship.rs/install.sh)"

Alternatively, install Starship using any of the following package managers:

Repository Instructions
crates.io cargo install starship --locked
conda-forge conda install -c conda-forge starship
Homebrew brew install starship
MacPorts port install starship
Windows

Install Starship using any of the following package managers:

Repository Instructions
crates.io cargo install starship --locked
Chocolatey choco install starship
conda-forge conda install -c conda-forge starship
Scoop scoop install starship

Step 2. Setup your shell to use Starship

Configure your shell to initialize starship. Select yours from the list below:

Bash

Add the following to the end of ~/.bashrc:

eval "$(starship init bash)"
Cmd

You need to use Clink (v1.2.30+) with Cmd. Create a file at this path %LocalAppData%\clink\starship.lua with the following contents:

load(io.popen('starship init cmd'):read("*a"))()
Elvish

Add the following to the end of ~/.elvish/rc.elv:

eval (starship init elvish)

Note: Only Elvish v0.17+ is supported

Fish

Add the following to the end of ~/.config/fish/config.fish:

starship init fish | source
Ion

Add the following to the end of ~/.config/ion/initrc:

eval $(starship init ion)
Nushell

Add the following to the end of your Nushell configuration (find it by running config path):

startup = [
  "mkdir ~/.cache/starship",
  "starship init nu | save ~/.cache/starship/init.nu",
  "source ~/.cache/starship/init.nu",
]
prompt = "starship_prompt"
PowerShell

Add the following to the end of your PowerShell configuration (find it by running $PROFILE):

Invoke-Expression (&starship init powershell)
Tcsh

Add the following to the end of ~/.tcshrc:

eval `starship init tcsh`
Xonsh

Add the following to the end of ~/.xonshrc:

execx($(starship init xonsh))
Zsh

Add the following to the end of ~/.zshrc:

eval "$(starship init zsh)"

Step 3. Configure Starship

Start a new shell instance, and you should see your beautiful new shell prompt. If you're happy with the defaults, enjoy!

If you're looking to further customize Starship:

  • Configuration โ€“ learn how to configure Starship to tweak your prompt to your liking

  • Presets โ€“ get inspired by the pre-built configuration of others

๐Ÿค Contributing

We are always looking for contributors of all skill levels! If you're looking to ease your way into the project, try out a good first issue.

If you are fluent in a non-English language, we greatly appreciate any help keeping our docs translated and up-to-date in other languages. If you would like to help, translations can be contributed on the Starship Crowdin.

If you are interested in helping contribute to starship, please take a look at our Contributing Guide. Also, feel free to drop into our Discord server and say hi. ๐Ÿ‘‹

๐Ÿ’ญ Inspired By

Please check out these previous works that helped inspire the creation of starship. ๐Ÿ™


Starship rocket icon

๐Ÿ“ License

Copyright ยฉ 2019-present, Starship Contributors.
This project is ISC licensed.

GitHub

https://github.com/starship/starship
Comments
  • 1. success_symbol option of the status module is being ignored

    Bug Report

    Current Behavior

    success_symbol option of the status module is being ignored.

    Expected Behavior

    Show the success_symbol when command succeed as describe in the documentation: "The symbol displayed on program success"

    Additional context/Screenshots

     โฏ sh -c 'echo tst; exit 0;'                               
    tst
    
     โฏ sh -c 'echo tst; exit 7;'                               
    tst
    
     โฏ                                                    โœ— [7]
    

    Possible Solution

    ATM IDK. I will update this issue, if I come up with something.

    Environment

    • Starship version: starship 1.4.2 branch: commit_hash: build_time:2022-03-10 18:01:38 +00:00 build_env:rustc 1.59.0
    • Shell type: zsh
    • Shell version: zsh 5.8 (x86_64-apple-darwin21.0)
    • Shell plugin manager: nothing
    • Terminal emulators: iTerm and Alacritty
    • Operating system: MacOS 12.2.1

    Relevant Shell Configuration

    ~
    โฏ cat ~/.zshrc
    eval "$(starship init zsh)"
    

    Starship Configuration

    format = " $character"
    right_format = "$status "
    
    [character]
    success_symbol = "[โฏ](bold green)"
    error_symbol   = "[โฏ](bold green)"
    vicmd_symbol   = "[โฎ](bold green)"
    
    [status]
    style = "fg:blue"
    symbol = "[โœ—](bold red)"
    success_symbol = "[โœ”๏ธ](bold green)"
    format = '$symbol$success_symbol [\[$int\]]($style) '
    disabled = false
    
    Reviewed by IzhakJakov at 2022-03-14 03:53
  • 2. Module configuration with format strings

    With more and more configuration being introduced into Starship, we're starting to see a fair bit of configuration bloat that simply modifies the formatting of the output, rather than changing the way the prompt retrieves information or processes context. (e.g. #603, #623)

    What I would like to propose is the following configuration:

    [cmd_duration]
    # ${duration} - The duration of the last running command
    
    format = "took ${duration}!"
    

    This would allow us to remove all the following configuration options in modules where they are static:

    • symbol
    • prefix
    • suffix

    In modules where the values are dynamic, they would remain. For example, the character module:

    [character]
    # ${prompt_symbol} - The prompt symbol
    
    format = "${prompt_symbol} "
    symbol = "โฏ"
    error_symbol = "โœ–"
    

    We could also remove the following configuration options from git_status, where enabling them would be implicit by them being in the format string:

    • conflicted_count
    • untracked_count
    • modified_count
    • etc...

    This would, of course, require some changes in the way we educate users, but I think it would make for a less dense and complicated configuration system in the long run.

    Reviewed by matchai at 2019-11-04 11:10
  • 3. feat: Add Java Module

    Implemented a basic Java module, that shows the Java version, when inside a Java/Maven Project.

    Description

    • New module java that calls javac --version, to get the version of Java
    • Simple tests for the formatting and call to javac
    • Updated the Dockerfile to install Java

    Motivation and Context

    Just another language that can be supported.

    Types of changes

    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [x] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

    Screenshots (if appropriate):

    MacOS: java_mac

    Linux (WSL): java_wsl

    How Has This Been Tested?

    • [x] I have tested using MacOS
    • [x] I have tested using Linux
    • [ ] I have tested using Windows

    Checklist:

    • [x] I have updated the documentation accordingly.
    • [x] I have updated the tests accordingly.
    Reviewed by jakubclark at 2019-09-08 00:09
  • 4. Windows Directory Formatting

    Current Behavior

    Hi all,

    I was pleased to see that starship supports Powershell in addition to macOS and Linux. However when using Powershell in Windows 10 (i.e. not WSL), the directory formatting is off. The prompt shows C:\Windows as /c/Windows

    Is this intended? This makes sense for WSL or Powershell under macOS/Linux but not for Powershell under Windows.

    Thanks for all the work you do.

    Expected Behavior

    Prompt should display C:\Windows as C:\Windows

    Additional context/Screenshots

    Annotation 2020-04-14 133141

    Possible Solution

    Environment

    • Starship version: 0.40.1
    • powershell version: 5.1.18362.628
    • Operating system: Windows Windows 10 10.0.18363
    • Terminal emulator: Windows Terminal 0.10.781.0

    Relevant Shell Configuration

    powershell

    Starship Configuration

    default configuration

    Reviewed by ylor at 2020-04-14 17:42
  • 5. feat: add Haskell Stack support

    Description

    • Add a Haskell Stack module, when it detects stack.yaml file.

    Motivation and Context

    ~Closes #~ I have a bunch of Haskell projects and I'm really missing support for Haskell in starship.

    Types of changes

    • [ ] Bug fix (non-breaking change which fixes an issue)
    • [x] New feature (non-breaking change which adds functionality)
    • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

    Screenshots (if appropriate):

    Screen Shot 2019-10-16 at 12 27 15 PM

    How Has This Been Tested?

    • [x] I have tested using MacOS
    • [x] I have tested using Linux
    • [ ] I have tested using Windows

    Checklist:

    • [x] I have updated the documentation accordingly.
    • [x] I have updated the tests accordingly.
    • [ ] Add support for other Haskell: cabal, .hs files etc.
    Reviewed by m0nhawk at 2019-10-16 05:51
  • 6. feat(username): Detect Admin access in Windows

    Description

    This PR adds support for detecting elevated status on Windows, much like root on unix.

    Motivation and Context

    Closes #3628

    The root part of the username module was not working on Windows. Hence, the PR. The elevation detection is done using the deelevate crate.

    How Has This Been Tested?

    • [ ] I have tested using MacOS
    • [ ] I have tested using Linux
    • [x] I have tested using Windows

    Checklist:

    • [x] I have updated the documentation accordingly.
    • [x] I have updated the tests accordingly.
    Reviewed by rashil2000 at 2021-06-08 22:01
  • 7. Starship prompt takes ~20 seconds when inside rust repo

    Current Behavior

    I'm not sure what has caused this exactly but I opened up a terminal recently and every time I hit enter, I'm now waiting ~20 seconds when inside a rust project. I'm seeing two identical processes jump to 100% cpu in htop: /root/.cargo/bin/starship prompt --status=0 --jobs=0.

    Expected Behavior

    Starship time to be imperceptible.

    Additional context/Screenshots

    n/a

    Possible Solution

    Unclear.

    Environment

    • Starship version: 0.33.1
    • zsh version: zsh 5.4.2 (x86_64-ubuntu-linux-gnu)
    • Operating system: Ubuntu running in Docker.
    • Terminal emulator: vscode 1.42.0-insider
    • Cargo version: cargo 1.42.0-nightly (f6449ba23 2020-01-21)

    Relevant Shell Configuration

    # See https://superuser.com/questions/1243138/why-does-ignoreeof-not-work-in-zsh
    setopt ignore_eof
    
    # Rust/cargo
    export PATH="$HOME/.cargo/bin:$PATH"
    
    # See https://github.com/starship/starship. Installed via cargo.
    eval "$(starship init zsh)"
    
    alias gs='git status'
    alias gc='git commit -m '
    alias ga='git add '
    alias gd='git diff'
    

    Starship Configuration

    <unknown config>
    
    Reviewed by samuela at 2020-01-30 23:59
  • 8. perf(async): Introduce async and timeout support

    Description

    Currently, this will:

    • replace rayon with async_std
    • adds support for specifying a per-module "timeout" key in config
    • adds support for specifying a global "prompt_timeout" key in config, used for all modules that don't have a "timeout" explicitly given
    • changes all modules to execute subprocesses and file reads asynchronously, and library calls on a different future, so the timeouts work
    • report an exceeded timeout value when running timings

    A quick measurement shows no visible performance impact https://github.com/starship/starship/issues/312#issuecomment-767142122

    Feedback welcome as to exactly how to deal with timeouts, and when they should be silent or not. The current version is geared for debugging, so it's immediately obvious which module is causing the prompt to hang.

    Motivation and Context

    Async allows pervasive and simple handling of timeouts for virtually any code. There are multiple open issues related to responsiveness, and this approach with allow timeout control with arbitrary granularity, while maintaining parallelism.

    Closes #312, #597, #891, #940, #1551 Will possibly close a few others once fully implemented.

    How Has This Been Tested?

    • [ ] I have tested using MacOS
    • [x] I have tested using Linux
    • [ ] I have tested using Windows

    Checklist:

    • [x] I have updated the documentation accordingly.
    • [ ] I have updated the tests accordingly.
    Reviewed by alexmaco at 2021-01-28 13:13
  • 9. Freezes and uses 100% of cpu in huge? git directories.

    Current Behavior

    Freeze in some directories.

    /usr/bin/ls -lRa | wc -l     
    65256
    

    It's git directory with rust project with a bunch of small files. Any command evaluates nearly 10 seconds and consumes 100% of CPU. In any other directory it works perfectly,

    Expected Behavior

    Not to freeze/

    Additional context/Screenshots

    asciicast

    Environment

    • Starship version: 0.36.0
    • zsh version: zsh 5.7.1 (x86_64-pc-linux-gnu)
    • Operating system: Linux 19.0
    • Terminal emulator:

    Relevant Shell Configuration

    export RUSTC_WRAPPER=sccache
    export EDITOR=vim
    alias rfm='fd --extension rs --exec=rustfmt'
    # pacmatic needs to be run as root: https://github.com/keenerd/pacmatic/issues/35
    alias pacmatic='sudo --preserve-env=pacman_program /usr/bin/pacmatic'
    # Downgrade permissions as AUR helpers expect to be run as a non-root user. $UID is read-only in {ba,z}sh.
    alias yay='pacman_program="sudo -u #$UID /usr/bin/yay --pacman powerpill" pacmatic'
    # If you come from bash you might have to change your $PATH.
    # export PATH=$HOME/bin:/usr/local/bin:$PATH
    alias open=xdg-open
    # Path to your oh-my-zsh installation.
    export ZSH="/home/username/.oh-my-zsh"
    #alias less=bat
    # Set name of the theme to load --- if set to "random", it will
    # load a random theme each time oh-my-zsh is loaded, in which case,
    # to know which specific one was loaded, run: echo $RANDOM_THEME
    # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
    ZSH_THEME="robbyrussell"
    path+=('~/.cargo/bin')
    export PATH
    # Set list of themes to pick from when loading at random
    # Setting this variable when ZSH_THEME=random will cause zsh to load
    # a theme from this variable instead of looking in ~/.oh-my-zsh/themes/
    # If set to an empty array, this variable will have no effect.
    # ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
    
    # Uncomment the following line to use case-sensitive completion.
    # CASE_SENSITIVE="true"
    
    # Uncomment the following line to use hyphen-insensitive completion.
    # Case-sensitive completion must be off. _ and - will be interchangeable.
    # HYPHEN_INSENSITIVE="true"
    
    # Uncomment the following line to disable bi-weekly auto-update checks.
    # DISABLE_AUTO_UPDATE="true"
    
    # Uncomment the following line to automatically update without prompting.
    # DISABLE_UPDATE_PROMPT="true"
    
    # Uncomment the following line to change how often to auto-update (in days).
     export UPDATE_ZSH_DAYS=13
    
    # Uncomment the following line if pasting URLs and other text is messed up.
    # DISABLE_MAGIC_FUNCTIONS=true
    
    # Uncomment the following line to disable colors in ls.
    # DISABLE_LS_COLORS="true"
    
    # Uncomment the following line to disable auto-setting terminal title.
    # DISABLE_AUTO_TITLE="true"
    
    # Uncomment the following line to enable command auto-correction.
    # ENABLE_CORRECTION="true"
    
    # Uncomment the following line to display red dots whilst waiting for completion.
    # COMPLETION_WAITING_DOTS="true"
    
    # Uncomment the following line if you want to disable marking untracked files
    # under VCS as dirty. This makes repository status check for large repositories
    # much, much faster.
    # DISABLE_UNTRACKED_FILES_DIRTY="true"
    
    # Uncomment the following line if you want to change the command execution time
    # stamp shown in the history command output.
    # You can set one of the optional three formats:
    # "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
    # or set a custom format using the strftime function format specifications,
    # see 'man strftime' for details.
    # HIST_STAMPS="mm/dd/yyyy"
    
    # Would you like to use another custom folder than $ZSH/custom?
    # ZSH_CUSTOM=/path/to/new-custom-folder
    
    # Which plugins would you like to load?
    # Standard plugins can be found in ~/.oh-my-zsh/plugins/*
    # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
    # Example format: plugins=(rails git textmate ruby lighthouse)
    # Add wisely, as too many plugins slow down shell startup.
    plugins=(
    	git
    	zsh-autosuggestions
    	zsh-syntax-highlighting
    	archlinux
    )
    
    source $ZSH/oh-my-zsh.sh
    
    # User configuration
    
    # export MANPATH="/usr/local/man:$MANPATH"
    
    # You may need to manually set your language environment
    # export LANG=en_US.UTF-8
    
    # Preferred editor for local and remote sessions
    # if [[ -n $SSH_CONNECTION ]]; then
    #   export EDITOR='vim'
    # else
    #   export EDITOR='mvim'
    # fi
    
    # Compilation flags
    # export ARCHFLAGS="-arch x86_64"
    
    # Set personal aliases, overriding those provided by oh-my-zsh libs,
    # plugins, and themes. Aliases can be placed here, though oh-my-zsh
    # users are encouraged to define aliases within the ZSH_CUSTOM folder.
    # For a full list of active aliases, run `alias`.
    #
    # Example aliases
    # alias zshconfig="mate ~/.zshrc"
    # alias ohmyzsh="mate ~/.oh-my-zsh"
    autoload -U compinit && compinit
    unalias ls
    alias ls='exa'
    eval "$(starship init zsh)"
    
    #source /home/username/.config/broot/launcher/bash/br
    fpath=( ~/.zfunc "${fpath[@]}" )
    

    Starship Configuration

    [battery]
    full_symbol = "๐Ÿ”‹"
    charging_symbol = "โšก๏ธ"
    discharging_symbol = "๐Ÿ’€"
    [character]
    symbol = "โžœ"
    error_symbol = "โœ—"
    use_symbol_for_status = true
    
    [directory]
    truncation_length = 8
    [git_branch]
    symbol = "๐ŸŒฑ "
    truncation_length = 4
    truncation_symbol = ""
    [git_status]
    conflicted = "๐Ÿณ"
    ahead = "๐ŸŽ๐Ÿ’จ"
    behind = "๐Ÿ˜ฐ"
    diverged = "๐Ÿ˜ต"
    untracked = "๐Ÿคท"
    stashed = "๐Ÿ“ฆ"
    modified = "๐Ÿ“"
    staged.value = "++"
    staged.style = "green"
    staged_count.enabled = true
    staged_count.style = "green"
    renamed = "๐Ÿ‘…"
    deleted = "๐Ÿ—‘"
    [hostname]
    ssh_only = true
    prefix = "โŸช"
    suffix = "โŸซ"
    disabled = false
    [jobs]
    symbol = "+ "
    threshold = 4
    [line_break]
    disabled = true
    [package]
    symbol = "๐ŸŽ "
    [memory_usage]
    show_percentage = true
    show_swap = true
    threshold = -1
    symbol = " "
    separator = "/"
    style = "bold dimmed green"
    dis[memory_usage]
    show_percentage = true
    show_swap = true
    threshold = -1
    symbol = " "
    separator = "/"
    style = "bold dimmed green"
    disabled = false
    
    
    Reviewed by 0xdeafbeef at 2020-02-15 17:51
  • 10. Starship is slow within rust directories

    Current Behavior

    In rust project directories starship takes a considerably longer about of time to re-appear as the prompt.

    Expected Behavior

    I would expect starship to be just as fast as in other directories.

    Additional context/Screenshots

    Screen Shot 2020-12-17 at 13 54 07

    Environment

    • Starship version: 0.47.0
    • fish version: fish, version 3.1.2
    • Operating system: Mac OS 11.2.0
    • Terminal emulator: Alacritty

    Relevant Shell Configuration

    #!/usr/bin/env fish
    set fish_greeting ""
    
    fish_vi_key_bindings
    set fish_cursor_default line
    set fish_cursor_insert line
    set fish_cursor_replace_one underscore
    set fish_cursor_visual block
    set -U __done_min_cmd_duration 5000  
    
    alias :o='nvim'
    alias git='hub'
    alias :e='vim'
    alias b='brew'
    alias c='cargo'
    alias ping='gping'
    alias :q='exit'
    alias ..="cd .."
    alias ...="cd ../.."
    alias ....="cd ../../.."
    alias .....="cd ../../../.."
    alias ......="cd ../../../../.."
    alias brewup='brew update; brew upgrade; brew upgrade --cask; brew cleanup; brew doctor'
    alias cat='bat'
    alias nat='natls -lgn'
    alias ls='nat'
    alias l='ls -h'
    alias wclock='watch -n1 "date '+%D%n%T'|figlet -k"'
    alias vim='nvim'
    alias vi='nvim'
    alias v='nvim'
    alias rm='trash'
    alias brave='open -a "/Applications/Brave Browser Dev.app/"'
    
    set -x PATH $HOME/bin /usr/local/sbin /usr/local/bin /usr/bin /bin /usr/sbin /sbin $HOME/.cargo/bin $HOME/.projects/bin $HOME/Library/Python/2.7/bin $HOME/.local/bin $HOME/go/bin /usr/local/texlive/2020/bin/x86_64-darwin /usr/local/opt/qt/bin /usr/local/opt/[email protected]/bin $HOME/.deno/bin
    source $HOME/.cargo/env
    thefuck --alias | source
    [ -f /usr/local/share/autojump/autojump.fish ]; and source /usr/local/share/autojump/autojump.fish
    set -q GHCUP_INSTALL_BASE_PREFIX[1]; or set GHCUP_INSTALL_BASE_PREFIX $HOME
    test -f /Users/willlane/.ghcup/env ; and set -gx PATH $HOME/.cabal/bin /Users/willlane/.ghcup/bin $PATH
    set -Ux EDITOR nvim
    set -Ux VISUAL nvim
    zoxide init fish | source
    eval (opam env)
    starship init fish | source
    

    Starship Configuration

    [line_break]
    disabled = true
    
    [aws]
    disabled = true
    
    
    Reviewed by willdoescode at 2020-12-17 21:54
  • 11. New nodejs character positioned incorrectly

    Bug Report

    Current Behavior

    The prompt for nodejs directories uses a new nerd-font character that does not render correctly. Itโ€™s positioned incorrectly and results in a collision with neighboring characters.

    Expected Behavior

    The nodejs character should not collide with neighboring characters.

    Additional context/Screenshots

    Screen Shot 2021-04-02 at 15 14 33

    Possible Solution

    Revert #1649.

    Environment

    • Starship version: starship 0.51.0
    • Shell type: zsh
    • Shell version: zsh 5.8 (x86_64-apple-darwin20.0)
    • Shell plugin manager: none
    • Terminal emulator: Terminal
    • Operating system: macOS 11.2.3

    Relevant Shell Configuration

    # Bash style word boundaries (including / and -)
    autoload -U select-word-style
    select-word-style bash
    
    # Git completions
    autoload -Uz compinit && compinit
    
    # rbenv (Ruby version manager)
    # [Disabled for performance reasons]
    # eval "$(rbenv init -)"
    
    # nvm (node version manager)
    export NVM_DIR="$HOME/.nvm"
    [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm
    [ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
    
    export PATH="/usr/local/sbin:$PATH"
    
    eval "$(starship init zsh)"
    

    Starship Configuration

    # Don't print a new line at the start of the prompt
    add_newline = false
    
    # Replace the "โฏ" symbol in the prompt
    [character]
    success_symbol = "[โฏ]()"
    
    # Disable the package module, hiding it from the prompt completely
    # [package]
    # disabled = true
    
    Reviewed by adamshaylor at 2021-04-02 22:25
  • 12. Guix shell support

    Feature Request

    Is your feature request related to a problem? Please describe.

    No support for Guix environments. I became reliant on this prompt for Nix shells so why not for Guix shells, too. :)

    Describe the solution you'd like

    There is a way to detect whether one is inside of a Guix shell through the GUIX_ENVIRONMENT variable. For more details, see the related page.

    Describe alternatives you've considered

    No alternative solution found so far.

    Reviewed by foo-dogsquared at 2022-05-20 23:45
  • 13. fix(directory): Only replace last occurance of contracted_path

    Fixes the directory module omitting all occurances of the repository root directory name from the whole directory path in some cases

    Description

    Previously using truncate_to_repo = false in combination with custom repo_root_style would replace all instances of contracted_path.

    As contracted_path is equal to the name of the repository root if the current working directory is the repository root, it could happen that a parent directory with the same name also got replaced with an empty string.

    Given the path ~/projects/github.com/starship/starship, the directory module would show ~/projects/github.com//starship under the conditions mentioned above.

    This pull request updates the implementation to only replace the last occurance of contracted_path in the directory string, as such properly showing ~/projects/github.com/starship/starship for the example.

    Motivation and Context

    The directory module should not omit parts of the directory path unless explicitly told to.

    Screenshots (if appropriate):

    image

    How Has This Been Tested?

    • [ ] I have tested using MacOS
    • [x] I have tested using Linux
    • [ ] I have tested using Windows

    Checklist:

    • [ ] I have updated the documentation accordingly.
    • [x] I have updated the tests accordingly.
    Reviewed by networkException at 2022-05-20 23:40
  • 14. Nushell + Unix tools on Windows = bad init config

    Current Behavior

    When starship init nu is executed, the code path uses StarshipPath::sprint_posix() to generate the path to starship.exe. This method checks if cygpath is executable, and if so assumes that the path should be passed through cygpath. This turns a path like 'C:\Windows' into '/c/Windows/'

    This is a problem for me because I have MSYS installed and include it's bin directories in my path, which includes cygpath.

    Expected Behavior

    Since Nushell runs as a fully native Windows program and accepts normal Windows paths, starship init nu should not try to detect cygpath in my opinion. For reference, powershell is also fully native and cross-platform, and it does not try to detect cygpath.

    Possible Solution

    For Nushell init, call sprint() instead of sprint_posix()

    Environment

    • Starship version: 1.6.3
    • nu version: 0.62.0
    • Operating system: Windows 10.0.19044
    • Terminal emulator:
    • Git Commit Hash: 0a9fabe1
    • Branch/Tag: master
    • Rust Version: rustc 1.60.0 (7737e0b5c 2022-04-04)
    • Rust channel: stable-x86_64-pc-windows-msvc release
    • Build Time: 2022-04-26 19:04:15 +00:00

    Shell configuration

    is irrelevant

    Reviewed by TyPR124 at 2022-05-20 13:33
  • 15. docs: Add MPR installation instructions to README.md

    Description

    This PR adds installation instructions for the makedeb Package Repository, an AUR-like platform for Debian and Ubuntu based distributions.

    Motivation and Context

    This brings native .deb packaging for Starship. It won't bring Starship into the Debian/Ubuntu repositories themselves, but it provides a means of distribution for .deb packages at the least.

    Screenshots (if appropriate):

    N/A

    How Has This Been Tested?

    • [ ] I have tested using MacOS
    • [x] I have tested using Linux
    • [ ] I have tested using Windows

    Checklist:

    • [ ] I have updated the documentation accordingly.
    • [ ] I have updated the tests accordingly.
    Reviewed by hwittenborn at 2022-05-18 18:53
  • 16. chore(master): release 1.7.0

    :robot: I have created a release beep boop

    1.7.0 (2022-05-18)

    Features

    • go: check for go.work file to show Go module in prompt (#3968) (9ebfce1)
    • hostname: add ssh_symbol for ssh connections (#3806) (2bf30dc)
    • package: Extract package version from PEP 621 compliant pyproject.toml (#3950) (1b938fd)
    • rust: Display toolchain names (#3414) (393d62c)

    Bug Fixes

    • ci: Version bump and fix Crowdin Pretranslate (#3992) (a0a6c94)
    • Do not panic in config if editor not found (#3766) (2e80aec)
    • module: list option not working (#3919) (6fe6735)
    • nu: use the most recent starship init (#3908) (382445d)
    • Use git2::Repository::open_ext() instead of discover() (#3591) (81a696a)

    This PR was generated with Release Please. See documentation.

    Reviewed by github-actions[bot] at 2022-05-18 07:07
  • 17. Support external modules shipped with CLIs

    Feature Request

    Is your feature request related to a problem? Please describe.

    I am working on making it easy for CLI developers to create prompt modules for their CLIs. Specifically I was targeting Rust's Clap and Python's Click developers for now. The libraries would make it easy to ship prompt modules with your CLI.

    An example use case is a CLI that is connected to a particular account, for example a hypothetical cli called tweet that simply tweets what you pass it. You're a developer advocate for a company and you sometimes use it for company purposes and sometimes private. It'd be interesting to see what account you are currently using. The tweet command could provide a Starship module when you install it and help you remember what account you're using:

    ~ ๐Ÿฆ company 
    โžœ tweet Better not tweet something personal!
    
    ~ ๐Ÿฆ personal 
    โžœ tweet Ah, now I can tweet what I want!
    

    These kinds of CLIs would likely never get added to Starship's official plugins, many couldn't do to being closed source like internal company CLIs.

    Describe the solution you'd like

    Starship could support reading a folder containing multiple config files. A CLI might ship with a segment it would store in /etc/starship/custom/mycli.toml which Starship would read. These would be parsed like a [custom.mycli] module and added to the general config.

    Perhaps a more expansive integration could be thought of later to support smarter formatting as this would be limited to the custom modules have available. Though I will be happy with a simple implementation for now using the custom modules.

    Describe alternatives you've considered

    CLIs can edit the single starship.toml file, though that might result in corrupting the file, or in the least it will constantly reformat/restructure the file due to CLIs adding/removing items or the CLIs getting updated.

    Reviewed by AndreasBackx at 2022-05-15 23:51
A super simple prompt for Fish shell, just shows git info and Vi mode.
A super simple prompt for Fish shell, just shows git info and Vi mode.

vifi is a portmandeau of 'Vi' and 'Fish', because it's a prompt for Fish shell, primarily focused around showing proper indicators when using Vi key bindings.

Apr 9, 2022
A very opinionated, zero-configuration shell prompt
A very opinionated, zero-configuration shell prompt

A very opinionated, zero-configuration shell prompt

Nov 4, 2021
Shellfirm - Intercept any risky patterns (default or defined by you) and prompt you a small challenge for double verification
Shellfirm - Intercept any risky patterns (default or defined by you) and prompt you a small challenge for double verification

shellfirm Opppppsss you did it again? ?? ?? ?? Protect yourself from yourself! rm -rf * git reset --hard before saving? kubectl delete ns which going

May 10, 2022
Standard Graphics is a command-line tool for printing 2D graphics from any language to any screen.
Standard Graphics is a command-line tool for printing 2D graphics from any language to any screen.

2D graphics in any programming language with just print statements!

Apr 5, 2022
A robust, customizable, blazingly-fast, efficient and easy-to-use command line application to uwu'ify your text!
A robust, customizable, blazingly-fast, efficient and easy-to-use command line application to uwu'ify your text!

uwuifyy A robust, customizable, blazingly-fast, efficient and easy-to-use command line application to uwu'ify your text! Logo Credits: Jade Nelson Tab

Apr 12, 2022
zoxide is a blazing fast replacement for your cd command
zoxide is a blazing fast replacement for your cd command

zoxide A smarter cd command for your terminal zoxide is a blazing fast replacement for your cd command, inspired by z and z.lua. It keeps track of the

May 19, 2022
โšก๏ธ A blazing fast way of maintaining powerful notes with connections between them.
 โšก๏ธ A blazing fast way of maintaining powerful notes with connections between them.

Zettl โšก๏ธ A blazing fast way of maintaining powerful notes with connections between them. Installing Zettl To install Zettl, you will need the Rust too

May 21, 2022
A blazing fast command line license generator for your open source projects written in Rust๐Ÿš€
A blazing fast command line license generator for your open source projects written in Rust๐Ÿš€

Overview This is a blazing fast โšก , command line license generator for your open source projects written in Rust. I know that GitHub

Apr 24, 2022
โšก A Blazing fast alternative to the stock windows folder delete function!
โšก A Blazing fast alternative to the stock windows folder delete function!

Turbo Delete A blazing fast alternative to the default Windows delete. Turbodelete is a blazing fast alternative to the default Windows delete functio

May 23, 2022
A cross-platform graphical process/system monitor with a customizable interface and a multitude of features
A cross-platform graphical process/system monitor with a customizable interface and a multitude of features

A cross-platform graphical process/system monitor with a customizable interface and a multitude of features. Supports Linux, macOS, and Windows. Inspired by both gtop and gotop.

May 26, 2022
A hackable, minimal, fast TUI file explorer, stealing ideas from nnn and fzf.
A hackable, minimal, fast TUI file explorer, stealing ideas from nnn and fzf.

xplr A hackable, minimal, fast TUI file explorer, stealing ideas from nnn and fzf. [Quickstart] [Features] [Plugins] [Documentation] [Upgrade Guide] [

May 18, 2022
โšก๏ธ Lightning-fast and minimal calendar command line. Written in Rust ๐Ÿฆ€
โšก๏ธ Lightning-fast and minimal calendar command line. Written in Rust ๐Ÿฆ€

โšก๏ธ Lightning-fast and minimal calendar command line. It's similar to cal. Written in Rust ??

Mar 29, 2022
๐Ÿข Atuin replaces your existing shell history with a SQLite database, and records additional context for your commands
๐Ÿข Atuin replaces your existing shell history with a SQLite database, and records additional context for your commands

Atuin replaces your existing shell history with a SQLite database, and records additional context for your commands. Additionally, it provides optional and fully encrypted synchronisation of your history between machines, via an Atuin server.

May 23, 2022
Self-contained template system with Handlebars and inline shell scripts

Handlematters Self-contained template system with Handlebars and inline shell scripts Introduction Handlematters is a template system that combines Ha

Nov 23, 2021
A Unix shell written and implemented in rust ๐Ÿฆ€

vsh A Blazingly fast shell made in Rust ?? Installation Copy and paste the following command and choose the appropriate installtion method for you. Yo

Apr 6, 2022
Application microframework with command-line option parsing, configuration, error handling, logging, and shell interactions
Application microframework with command-line option parsing, configuration, error handling, logging, and shell interactions

Abscissa is a microframework for building Rust applications (either CLI tools or network/web services), aiming to provide a large number of features w

May 19, 2022
A command line interface meant to bridge the gap between Rust and shell scripting

clawbang A command line interface meant to bridge the gap between Rust and shell scripting. Intended for use with HEREDOCs and shebangs: $ clawbang <<

Mar 25, 2022
Works out if this is running from inside a shell, and if so, which one.

pshell pshell answers the question "Is my application running in a shell, and if so, which one". Example: you are installing something and want to mak

Apr 13, 2022
Non-interactive nREPL client for shell scripts and command-line

nreplops-tool (nr) nreplops-tool (nr) is a non-interactive nREPL client designed to be used in shell scripts and on the command-line. Early ฮฑ warning:

Apr 24, 2022