nicksieger / sheepsafe

Keep safe from FireSheep
MIT License
211 stars 11 forks source link

Confusing Prompt #4

Closed seangaffney closed 14 years ago

seangaffney commented 14 years ago

I'm probably just really thick, but I can't for the life of me get past this prompt:

Next, one or more network names (blank line to stop, RET for ["(redacted)", "(Mac address)"]) >

unless I just hit enter. Would it be too much to ask to make this prompt a bit more clear? I'm not even sure what these network names are for. Are they the ones that are to be trusted? That makes sense, but when I try to list them comma-separated it hangs, and when I put them in a hash it also hangs...

Any help much appreciated. Thanks for putting this together!

zachriggle commented 14 years ago

Ditto this. Not sure whether the prompt wants trusted names or untrusted ones. Trusted names make more sense, though.

jcf commented 14 years ago

Having read the installer.rb code it appears you can either…

Here's the code in question…

config.trusted_names = ask "Next, one or more network names (blank line to stop, RET for #{@names.inspect}) >\n" do |q|
  q.gather = ""
end
config.trusted_names = @names if config.trusted_names.empty?

Sheepsafe uses highline to read and write to your shell. ask uses gets and supports validation and other things like building arrays of strings, like is done above.

I think it would be easier to understand if the list were simply comma separated.

config.trusted_names = ask("Trusted network names (comma-seperated):\n").split(",").map(&:strip)

There may well be a way to get highline to do this for you mind.

nicksieger commented 14 years ago

Agree on all counts. The CLI probably received the least amount of attention and definitely could be word-smithed. Apologies for the ambiguity.

nicksieger commented 14 years ago

Let me know if 90986562 looks better.

solkennedy commented 14 years ago

Much better! I'd found the original wording confusing, but this new version is easier to parse.

seangaffney commented 14 years ago

Thanks Nick! Much clearer now across the entire CLI.