{"action":"created","issue":{"url":"https://api.github.com/repos/remkop/picocli/issues/297","repository_url":"https://api.github.com/repos/remkop/picocli","labels_url":"https://api.github.com/repos/remkop/picocli/issues/297/labels{/name}","comments_url":"https://api.github.com/repos/remkop/picocli/issues/297/comments","events_url":"https://api.github.com/repos/remkop/picocli/issues/297/events","html_url":"https://github.com/remkop/picocli/issues/297","id":303739776,"number":297,"title":"The command line opens while executing twice, the previously option value does not change？","user":{"login":"tofdragon","id":7513852,"avatar_url":"https://avatars0.githubusercontent.com/u/7513852?v=4","gravatar_id":"","url":"https://api.github.com/users/tofdragon","html_url":"https://github.com/tofdragon","followers_url":"https://api.github.com/users/tofdragon/followers","following_url":"https://api.github.com/users/tofdragon/following{/other_user}","gists_url":"https://api.github.com/users/tofdragon/gists{/gist_id}","starred_url":"https://api.github.com/users/tofdragon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tofdragon/subscriptions","organizations_url":"https://api.github.com/users/tofdragon/orgs","repos_url":"https://api.github.com/users/tofdragon/repos","events_url":"https://api.github.com/users/tofdragon/events{/privacy}","received_events_url":"https://api.github.com/users/tofdragon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-03-09T06:37:55Z","updated_at":"2018-03-13T00:53:21Z","closed_at":null,"author_association":"NONE","body":"```\r\n@CommandLine.Command(name = \"checksum\", description = \"Prints the checksum (MD5 by default) of a file to STDOUT.\")\r\nclass CheckSum222 implements Callable<Void> {\r\n\r\n    @CommandLine.Option(names = {\"-a\", \"--algorithm\"}, description = \"MD5, SHA-1, SHA-256, ...\")\r\n    private String algorithm = \"MD5\";\r\n\r\n    private static CheckSum222 checkSum222 = new CheckSum222();\r\n\r\n    public static void main(String[] args) throws Exception {\r\n        CommandLine cl = new CommandLine(checkSum222);\r\n        cl.parse(args);\r\n```\r\n\r\ncmd run twice\r\n\r\nfirst:\r\n\r\nchecksum -a  SHA-1  \r\nresult: algorithm = SHA-1\r\n\r\nsecond:\r\n\r\nchecksum \r\nresult:algorithm = SHA-1\r\n\r\nBut what I am looking for at this time is MD5. It is impossible to recreate the command object every time in programming.\r\n\r\nBut when there are no parameters, the first run parameters will be retained.\r\n"},"comment":{"url":"https://api.github.com/repos/remkop/picocli/issues/comments/372510144","html_url":"https://github.com/remkop/picocli/issues/297#issuecomment-372510144","issue_url":"https://api.github.com/repos/remkop/picocli/issues/297","id":372510144,"user":{"login":"tofdragon","id":7513852,"avatar_url":"https://avatars0.githubusercontent.com/u/7513852?v=4","gravatar_id":"","url":"https://api.github.com/users/tofdragon","html_url":"https://github.com/tofdragon","followers_url":"https://api.github.com/users/tofdragon/followers","following_url":"https://api.github.com/users/tofdragon/following{/other_user}","gists_url":"https://api.github.com/users/tofdragon/gists{/gist_id}","starred_url":"https://api.github.com/users/tofdragon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tofdragon/subscriptions","organizations_url":"https://api.github.com/users/tofdragon/orgs","repos_url":"https://api.github.com/users/tofdragon/repos","events_url":"https://api.github.com/users/tofdragon/events{/privacy}","received_events_url":"https://api.github.com/users/tofdragon/received_events","type":"User","site_admin":false},"created_at":"2018-03-13T00:53:21Z","updated_at":"2018-03-13T00:53:21Z","author_association":"NONE","body":"This question can be closed"}}
{"actor":{"display_login":"tofdragon"}}