Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multi-word and multi-line string options #172

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Support multi-word and multi-line string options #172

wants to merge 1 commit into from

Conversation

katomaso
Copy link

No description provided.

@gagarski
Copy link
Contributor

This should be handled by the shell running your program. An element of args array coming to main function can contain multi-word (and in fact it will if you pass an argument inside quotes) and multi-line string and args4j probably should not do anything about it.

@gagarski
Copy link
Contributor

PS C:\Users\gagar\IdeaProjects> cat .\ArgsDemo.java
public class ArgsDemo {
    public static void main(String[] args) {
        for (String arg : args) {
            System.out.println(arg);
        }
    }
}
PS C:\Users\gagar\IdeaProjects> java .\ArgsDemo.java hello katomaso
hello
katomaso
PS C:\Users\gagar\IdeaProjects> java .\ArgsDemo.java "hello katomaso" another two arguments
hello katomaso
another
two
arguments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants