bashsimplecurses icon indicating copy to clipboard operation
bashsimplecurses copied to clipboard

Error "Option 1 does not exist" in README example

Open mrsarm opened this issue 2 years ago • 3 comments

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 ?

mrsarm avatar Aug 24 '21 13:08 mrsarm

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.)

leephillips avatar Dec 02 '21 14:12 leephillips

Is this still a bug ?

metal3d avatar Apr 20 '22 16:04 metal3d

I have no idea.

leephillips avatar Apr 20 '22 16:04 leephillips