Git Product home page Git Product logo

messa's Introduction

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

    install -D -m 755 <(curl -L https://github.com/shosatojp/messa/releases/download/v2.1.0/messa) ~/.local/bin/messa

    You may need to modify PATH

    export PATH="$HOME/.local/bin:$PATH"
    

OR

  • via cargo

    • Requirements
      • C Compiler
        • gcc
      • pkg-config
      • OpenSSL Development Package
        • Ubuntu/Debian: libssl-dev
        • Fedora: openssl-devel
      # ubuntu
      sudo apt-get install -y gcc pkg-config libssl-dev
    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
  • Nushell 🔗

    # command in nushell
    config set prompt "messa --error 0 --width (tput cols) --user $nu.env.USER --host (hostname) --shell fish"

3. Setup config

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

4. Reload your shell

. ~/.bashrc

Build

cargo build

Related projects

messa's People

Contributors

shosatojp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

messa's Issues

What shells does it support

Hi,
Curious, does it only work with bash?
Or, does it support other shells?

I'm interested to try it with nu.
Thx!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.