bashsimplecurses
bashsimplecurses copied to clipboard
Error "Option 1 does not exist" in README example
If I clone this repo, and create a file e.g. sample.sh
in the same folder, and add a content almost identical to the README sample on it:
#!/bin/bash
source ./simple_curses.sh
main (){
#your code here, you can add some windows, text...
window "title" "color"
append "Text..."
endwin
}
main_loop 1
Then adding execution permission (chmod +x simple_curses.sh
) and executing it I got this:
$ ./sample.sh
Option 1 does not exist
Removing the 1
argument to the main_loop
call in the last line of the script solves the issue.
Is the example in the README wrong/outdated ?
There was an undocumented change a while ago. Look at the bashbar.sh example, or just replace the main_loop call in your script with
main_loop -t 1 "$@"
(Yes, the README is outdated and incorrect.)
Is this still a bug ?
I have no idea.