make_prompt_rs/source.sh
Daniel Knuettel 73be916538 works
2024-04-16 20:34:30 +02:00

11 lines
223 B
Bash

bin_path=$(pwd)/target/debug/make_prompt
PROMPT_COMMAND='make_prompt'
make_prompt () {
local lastexit=$?
local bgjobs=$(jobs | wc -l)
local prompt_pref=$($bin_path $lastexit $bgjobs)
PS1="$prompt_pref"
}