#prompt #shell-prompt #width #flexible #bash #git #powerline-shell

app messa

fast, width flexible, powerline-shell like prompt

3 stable releases

2.1.0 Oct 18, 2021
2.0.1 Oct 17, 2021

#22 in #width

MIT license

83KB
1.5K SLoC

Rust 1.5K SLoC // 0.0% comments Shell 202 SLoC // 0.1% comments

messa

CI

  • Width flexible shell prompt

  • Fast

    normal directory git directory
    1.1 ms ± 0.2 ms 5.2 ms ± 0.1ms

    measured with hyperfine

  • Configure with yaml

  • Supports ssh, git, kubernetes, datetime

Install

1. Install messa

  • statically linked single binary from here

  • or Use cargo

    cargo install messa
    

2. Append following code to your shell config file

  • Bash

    # ~/.bashrc
    export PATH="$HOME/.cargo/bin:$PATH"
    function create_prompt(){
        PS1=$(messa --error $? --width $COLUMNS --user $USER --host $HOSTNAME --shell bash)
    }
    export PROMPT_COMMAND="create_prompt;$PROMPT_COMMAND"
    
  • Zsh

    # ~/.zshrc
    export PATH="$HOME/.cargo/bin:$PATH"
    function create_prompt() {
        PS1=$(messa --error $? --width $COLUMNS --user $USER --host $HOSTNAME --shell zsh)
    }
    precmd_functions+=(create_prompt)
    
  • Fish

    # ~/.config/fish/config.fish
    function fish_prompt
        messa --error $status --width $COLUMNS --user $USER --host $HOSTNAME --shell fish
    end
    

3. Setup config

wget -O ~/.messa.yaml https://raw.githubusercontent.com/shosatojp/messa/master/.messa.yaml

4. Reload your shell

. ~/.bashrc

Build

cargo build

Dependencies

~16MB
~353K SLoC