@Override
    public Set<TransferItem> find(final CommandLine input, final TerminalAction action, final Path remote) throws AccessDeniedException {
        if(input.getOptionValues(action.name()).length == 2) {
            final String path = input.getOptionValues(action.name())[1];
            // This only applies to a shell where the glob is not already expanded into multiple arguments
            if(StringUtils.containsAny(path, '*', '?')) {
                final Local directory = LocalFactory.get(FilenameUtils.getFullPath(path));
                if(directory.isDirectory()) {
                    final Set<TransferItem> items = new HashSet<TransferItem>();
                    for(Local file : directory.list(new NullFilter<String>() {
                        @Override
                        public boolean accept(final String file) {
                            return FilenameUtils.wildcardMatch(file, PathNormalizer.name(path));
                        }
                    })) {
                        items.add(new TransferItem(new Path(remote, file.getName(), EnumSet.of(Path.Type.file)), file));
                    }
                    return items;
                }
            }
        }
        return new SingleTransferItemFinder().find(input, action, remote);
    }
@Test
    public void testFind() throws Exception {
        File.createTempFile("temp", ".duck");
        final File f = File.createTempFile("temp", ".duck");
        File.createTempFile("temp", ".false");

        final CommandLineParser parser = new PosixParser();
        final CommandLine input = parser.parse(TerminalOptionsBuilder.options(), new String[]{"--upload", "rackspace://cdn.cyberduck.ch/remote", f.getParent() + "/*.duck"});

        final Set<TransferItem> found = new GlobTransferItemFinder().find(input, TerminalAction.upload, new Path("/cdn.cyberduck.ch/remote", EnumSet.of(Path.Type.file)));
        assertFalse(found.isEmpty());
        assertTrue(found.contains(new TransferItem(
                new Path(new Path("/cdn.cyberduck.ch/remote", EnumSet.of(Path.Type.directory)), f.getName(), EnumSet.of(Path.Type.file)),
                new Local(f.getAbsolutePath()))));
    }