private ExtractedCommand extractCommands(String s)
			throws ValidationException {
		Option<?> c = null;
		String arg = null;
		if (s.startsWith("--")) {
			s = s.substring(2);
			int i = s.indexOf('=');
			if (i > -1) {
				arg = s.substring(i + 1);
				s = s.substring(0, i);
			}
			c = options.get(s);
			if (c == null)
				throw new ValidationException("unknown option --" + s);
			c.mark();
		} else {
			String bundle = s.substring(1);
			if (bundle.length() == 0)
				throw new ValidationException("malformed option '-'");
			for (int i = 0; i < bundle.length(); i++) {
				String sc = bundle.substring(i, i + 1);
				c = options.get(sc);
				if (c == null)
					throw new ValidationException("unknown option -" + sc);
				c.mark();
			}
		}
		boolean stored = c instanceof BooleanOption;
		if (arg != null) {
			stored = true;
			c.store(arg);
		}
		return new ExtractedCommand(c, stored);
	}