jart / bestline

ANSI Standard X3.64 Teletypewriter Command Session Library
Other
443 stars 29 forks source link

Support multi-line prompts #34

Open MaxGyver83 opened 1 month ago

MaxGyver83 commented 1 month ago

How to test

You can test multi-line prompts in rc linked with bestline.

This branch alone isn't compatible with rc. But you can use my custom branch which contains some additional changes (like #33):

cd /tmp
git clone -b custom https://github.com/MaxGyver83/bestline
cd bestline
make libbestline.so
sudo cp libbestline.so /usr/local/lib/

cd ..
git clone https://github.com/rakitzis/rc
cd rc
make EDIT=bestline
./rc

fn prompt = { prompt = ($nl^`pwd^$nl^'% ' '  ') }