Skip to content

Latest commit

 

History

History
51 lines (39 loc) · 1.48 KB

README.md

File metadata and controls

51 lines (39 loc) · 1.48 KB

Longship

Makes your command line prompt more informative without being intrusive.

Installation

Install rust and cargo

Run cargo build --release to create a binary of the program.

Configuration

Simple replace your current PS1 with the path to the longship executable. No need for any elevated privileges.

zsh

PS1=$'$(/path/to/longship)'

bash

PS1='$(/path/to/longship)'

Example

If in a directory which is in /home/USER/.. a ~ will be displayed instead.

~/Code/rust_projects/longship
»

If rust, go or python files are present in the current directory they will be indicated with an indicating emoji and the version of the compiler/ interpreter.

If a python virtual environment is active its name will be displayed even when there are no python files.

If it is a remote session it is indicated with the user name and the last part of the IP address in front of the path.

If in a directory where in its or the parent path a .git/HEAD file is present the name of the branch will be displayed.

🛰 [USER.11]~/Code/rust_projects/longship/src 🌿master         🦀1.75.0  🐿️go1.22.4  🐍3.11.9 python_venv
»

You can still use all your desired command completions and all other features you modified your shell with without any changes.

Inspiration

This is heavily inspired by starship which is a much more powerful and versatile prompt.