geier / choose

make choices on the command line
MIT License
89 stars 2 forks source link

tty is assumed when it might be prompted #1

Closed Arnaudv6 closed 9 years ago

Arnaudv6 commented 9 years ago

Hello Christian, thanks for this script : it is comes handy indeed ! I actually can not use "choose" as I would, for when I select a line, it gets printed, but not piped.

I am not a shell guru, but I would say my console uses /dev/pts/1 as tty not /dev/tty which is hardcoded at the end of your script : any chance used tty can be detected and used in your script ?

Thanks, Arnaudv6

geier commented 9 years ago

Sorry, I somehow forgot about this. /dev/tty should always point the the terminal you are currently using. This was just a stupid bug. Should be fixed now, but if it doesn't work for you, please reopen.

Arnaudv6 commented 9 years ago

It works well indeed : thanks Christian, I enjoy your script very much !