summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/TweetShell.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/main/TweetShell.java b/src/main/TweetShell.java
index 6d9edd1..12814b0 100644
--- a/src/main/TweetShell.java
+++ b/src/main/TweetShell.java
@@ -171,9 +171,10 @@ public class TweetShell implements TwitterApi.PinSupplier {
close("Close the stream"),
exit("Returns to shell"),
help("Get help"),
- target("Set output target: one or more of {file, shell} with optional."
- + "'-' (disable) or '+' (enable) prefix. Without prefix, "
- + "only that target is enabled.");
+ target("Show output target (no args) or set output target: one or more "
+ + "of {file, shell}. With a '-' or '+' prefix, that target "
+ + "is removed/added from the list of targets. Without prefix, "
+ + "all other targets get disabled.");
private final String description;
private final int paramCount;
@@ -276,13 +277,18 @@ public class TweetShell implements TwitterApi.PinSupplier {
throw new NoSuchElementException();
case target:
if (params.length > 0) {
+ // due to limitations of shell (does not handle escapes),
+ // do a manualy split as we cannot have spaces in our args.
+ if (params.length == 1) {
+ params = params[0].split("\\s+");
+ }
configureTargets(params);
} else {
ClassEnabledTracker<ResultListener> targets;
targets = getPossibleTargets();
// print the names of all targets that are enabled
System.out.print("Enabled targets:");
- for (String name : targets.getNames()) {
+ for (String name : targets.getEnabled()) {
System.out.print(" " + name);
}
System.out.println();