Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rstrt

Installation

Build from source

Requires Rust.

git clone git@github.com:FilipHarald/rstrt.git
cd rstrt
cargo build --release
cp ./target/release/rainbow-street $HOME/bin/rstrt

($HOME/bin needs to be in your PATH)

Usage

bash-prompt

Use this in your .bashrc.

promptFunc() {
  if [[ -x $(realpath "$HOME/bin/rstrt") ]]
  then
    WD=`pwd | $HOME/bin/rstrt --ps1-escape`
    COLORIZED_DIR=`echo "${WD}" | awk -F/ '{print $NF}'`
    PS1="\`echo -e \"\[\a\]\[\033[01;32m\]\h\[\033[01;34m\] ${COLORIZED_DIR} \$ \"\`"
  else
    PS1='\[\a\]\[\033[01;32m\]\h\[\033[01;34m\] \W \$ \[\033[00m\]'
  fi
}
PROMPT_COMMAND="promptFunc"

listing files

find ~/* | rstrt

with fzf

find ~/* | rstrt | fzf --ansi

with fzf in nvim

let cwd = getcwd()
let $FZF_DEFAULT_COMMAND =  'find '.cwd.' -type f | rstrt'
let $FZF_DEFAULT_OPTS = '--ansi'

statusline in nvim

⚠ DEPRECATED ⚠

[rstrt.nvim](https://github.com/FilipHarald/rstrt.nvim)

About

Deterministic colorization for strings e.g. file paths

Resources

Stars

1 star

Watchers

1 watching

Forks

Used by

Contributors

Languages