Giter VIP home page Giter VIP logo

checkbox.sh's People

Contributors

pedro-hs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

checkbox.sh's Issues

option for status line

the line showing how many entries and the current entry + the number of selected entries may be useful for very long lists for short lists it's noise

Restore font color back to original after pressing enter to finish the checkbox selection

Hi

Thanks for the simple checkbox bash selection script, this is exactly what I was looking for.
One bug/problem I noticed is following:

  1. I have black color configured for my font in my bash shell
  2. I launch ./checkbox.sh script
  3. I select one item with base and press enter to finish the selection
  4. when checkbox.sh quits, my bash font color has switched from black to gray.

So I think the script should save the original color if possible during the start and then restore it back once finished.

option for separation lines

apart from some possible "design" feature the lines add little, an option to have them, or not have them would be nice

Invalid option for mac os

Looks like the script doesn't work on Mac OS

I am receiving error ->

./scripts/utils/checkbox.sh: line 416: read: -N: invalid option read: usage: read [-ers] [-u fd] [-t timeout] [-p prompt] [-a array] [-n nchars] [-d delim] [name ...]

Documentation tips

Hi, have a look at how a man page standard looks like, it's all nice with the animation but it's so noisy one barely finds the doc.

luckily you display a synopsis when something wrong is input, that should go to a --help function

unfortunately that synopsis disappears, after having grabbed and cleared the screen (please don't)

possibility to have non-option lines

option1
+option2

not an option, can be empty

more options
...

this system let's the user decide if they want separator lines, empty lines, anything they want

The letter e is removed from all of my strings

Using the latest version

test="test|test2"
./lib/checkbox.sh --options="$test" --multiple --message="Select"

Result

 Select
--------------------------------------------------
    [ ] tst
    [ ] tst2
--------------------------------------------------
  1/2  |  0 selected

proper handling of result

just write what is checked, Writing "Selected:" is not only useless but it's also not part of the results

the same goes for "nothing selected"

use exit code like any other program does!

Add shebang

sourcing is not the same as executing, not only is it weird but you pollute the namespace

Colors don't work well in Mac

Hi,

This is how it looks like now on MacOs Catalina

\e[2K\e[37m--------------------------------------------------
\e[2K\e[34m    [ ] Option 1
\e[2K\e[37m    [ ] Option 2
\e[2K\e[37m    [ ] Option 3
\e[2K\e[37m    [ ] Option 4
\e[2K\e[37m    [ ] Option 5
\e[2K\e[37m    [ ] Option 6
\e[2K\e[37m    [ ] Option 7
\e[2K\e[37m    [ ] Option 8
\e[2K\e[37m    [ ] Option 9
\e[2K\e[37m    [ ] Option 10
\e[2K\e[37m    [ ] Option 11
\e[2K\e[37m    [ ] Option 12
\e[2K\e[37m    [ ] Option 13
\e[2K\e[37m    [ ] Option 14
\e[2K\e[37m    [ ] Option 15
\e[2K\e[37m    [ ] Option 16
\e[2K\e[37m    [ ] Option 17
\e[2K\e[37m    [ ] Option 18
\e[2K\e[37m    [ ] Option 19
\e[2K\e[37m    [ ] Option 20
\e[2K\e[37m    [ ] Option 21
\e[2K\e[37m    [ ] Option 22
\e[2K\e[37m    [ ] Option 23
\e[2K\e[37m    [ ] Option 24
\e[2K\e[37m    [ ] Option 25
\e[2K\e[37m    [ ] Option 26
\e[2K\e[37m    [ ] Option 27
\e[2K\e[37m    [ ] Option 28
\e[2K\e[37m    [ ] Option 29
\e[2K\e[37m    [ ] Option 30
\e[2K\e[37m--------------------------------------------------
  1/30

Originally posted by @andreysmyntyna in #6 (comment)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.