{"action":"created","issue":{"url":"https://api.github.com/repos/raeesbhatti/ssh-agent-helper/issues/2","repository_url":"https://api.github.com/repos/raeesbhatti/ssh-agent-helper","labels_url":"https://api.github.com/repos/raeesbhatti/ssh-agent-helper/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/raeesbhatti/ssh-agent-helper/issues/2/comments","events_url":"https://api.github.com/repos/raeesbhatti/ssh-agent-helper/issues/2/events","html_url":"https://github.com/raeesbhatti/ssh-agent-helper/issues/2","id":184493230,"number":2,"title":"Usage / Switch Parsing Appears Inconsistent","user":{"login":"bambams","id":133756,"avatar_url":"https://avatars.githubusercontent.com/u/133756?v=3","gravatar_id":"","url":"https://api.github.com/users/bambams","html_url":"https://github.com/bambams","followers_url":"https://api.github.com/users/bambams/followers","following_url":"https://api.github.com/users/bambams/following{/other_user}","gists_url":"https://api.github.com/users/bambams/gists{/gist_id}","starred_url":"https://api.github.com/users/bambams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bambams/subscriptions","organizations_url":"https://api.github.com/users/bambams/orgs","repos_url":"https://api.github.com/users/bambams/repos","events_url":"https://api.github.com/users/bambams/events{/privacy}","received_events_url":"https://api.github.com/users/bambams/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-21T14:03:53Z","updated_at":"2016-10-21T14:19:17Z","closed_at":null,"body":"The program appears to require /startup in addition to /add for the agent to be started prior to running ssh-add, but the usage does not make this clear. I suggest refactoring the program into two steps: first loop over the arguments, one-by-one, parsing switches and storing the state of what the user wants to do in variables (e.g., add=true, keys=new List<string>{ \"C:\\blah\\id_rsa.pub\" }, register_startup=true, unregister_startup=false, etc.).\r\n\r\nOnce arguments have been processed and what to do is stored conveniently then we can do it a single time instead of repeating calls (e.g., to addKeys()). Hopefully that will make processing the arguments more clear and will simplify the program.\r\n\r\nThe usage could also be updated if necessary to ensure it's clear and correct."},"comment":{"url":"https://api.github.com/repos/raeesbhatti/ssh-agent-helper/issues/comments/255389650","html_url":"https://github.com/raeesbhatti/ssh-agent-helper/issues/2#issuecomment-255389650","issue_url":"https://api.github.com/repos/raeesbhatti/ssh-agent-helper/issues/2","id":255389650,"user":{"login":"raeesbhatti","id":10067728,"avatar_url":"https://avatars.githubusercontent.com/u/10067728?v=3","gravatar_id":"","url":"https://api.github.com/users/raeesbhatti","html_url":"https://github.com/raeesbhatti","followers_url":"https://api.github.com/users/raeesbhatti/followers","following_url":"https://api.github.com/users/raeesbhatti/following{/other_user}","gists_url":"https://api.github.com/users/raeesbhatti/gists{/gist_id}","starred_url":"https://api.github.com/users/raeesbhatti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raeesbhatti/subscriptions","organizations_url":"https://api.github.com/users/raeesbhatti/orgs","repos_url":"https://api.github.com/users/raeesbhatti/repos","events_url":"https://api.github.com/users/raeesbhatti/events{/privacy}","received_events_url":"https://api.github.com/users/raeesbhatti/received_events","type":"User","site_admin":false},"created_at":"2016-10-21T14:19:17Z","updated_at":"2016-10-21T14:19:17Z","body":"A very good idea indeed. Will work on it, thank you."}}
{"actor":{"display_login":"raeesbhatti"}}