{"action":"created","comment":{"url":"https://api.github.com/repos/globus/globus-cli/pulls/comments/171068392","pull_request_review_id":99857384,"id":171068392,"diff_hunk":"@@ -52,14 +69,37 @@ List files and dirs in your default directory on an endpoint.\n \n ----\n $ ep_id=ddb59aef-6d04-11e5-ba46-22000b92c6ec\n-$ ls $ep_id\n+$ globus ls $ep_id\n ----\n \n List files and dirs on a specific path on an endpoint.\n \n ----\n $ ep_id=ddb59aef-6d04-11e5-ba46-22000b92c6ec\n-$ ls $ep_id:/share/godata/\n+$ globus ls $ep_id:/share/godata/\n+----\n+\n+List files and dirs on a specific path on an endpoint, filtering in various\n+ways.\n+\n+----\n+$ ep_id=ddb59aef-6d04-11e5-ba46-22000b92c6ec\n+$ globus ls $ep_id:/share/godata/ --filter '~*.txt'  # all txt files\n+$ globus ls $ep_id:/share/godata/ --filter '!~file1.*'  # not starting in \"file1.\"\n+$ globus ls $ep_id:/share/godata/ --filter '~*ile3.tx*'  # anything with \"ile3.tx\"\n+$ globus ls $ep_id:/share/godata/ --filter '=file2.txt'  # only \"file2.txt\"\n+$ globus ls $ep_id:/share/godata/ --filter 'file2.txt'  # same as '=file2.txt'\n+$ globus ls $ep_id:/share/godata/ --filter '!=file2.txt'  # anything but \"file2.txt\"\n+----\n+\n+Compare a grep with a `globus ls --filter`. These two are the same, but the\n+filter will be faster because it doesn't require that filenames which are\n+filtered out are returned to the CLI:\n+\n+----\n+$ ep_id=ddb59aef-6d04-11e5-ba46-22000b92c6ec\n+$ globus ls $ep_id:/share/godata/ | egrep '*.txt'  # done with grep, okay\n+$ globus ls $ep_id:/share/godata/ --filter '~*.txt'  # done with --filter, better","path":"adoc/ls.1.adoc","position":60,"original_position":60,"commit_id":"d4e22997df2e76a12135cb37626b486cf3171ecb","original_commit_id":"d4e22997df2e76a12135cb37626b486cf3171ecb","user":{"login":"sirosen","id":1300022,"avatar_url":"https://avatars3.githubusercontent.com/u/1300022?v=4","gravatar_id":"","url":"https://api.github.com/users/sirosen","html_url":"https://github.com/sirosen","followers_url":"https://api.github.com/users/sirosen/followers","following_url":"https://api.github.com/users/sirosen/following{/other_user}","gists_url":"https://api.github.com/users/sirosen/gists{/gist_id}","starred_url":"https://api.github.com/users/sirosen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sirosen/subscriptions","organizations_url":"https://api.github.com/users/sirosen/orgs","repos_url":"https://api.github.com/users/sirosen/repos","events_url":"https://api.github.com/users/sirosen/events{/privacy}","received_events_url":"https://api.github.com/users/sirosen/received_events","type":"User","site_admin":false},"body":"I wanted a `*` grep so that the commands would have some parallel structure.\r\nI agree that it's not really ideal use of grep, but I think it makes a better example.\r\n\r\nWould `egrep '*\\.txt$'` be acceptable?","created_at":"2018-02-27T21:15:00Z","updated_at":"2018-02-27T21:15:00Z","html_url":"https://github.com/globus/globus-cli/pull/384#discussion_r171068392","pull_request_url":"https://api.github.com/repos/globus/globus-cli/pulls/384","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/globus/globus-cli/pulls/comments/171068392"},"html":{"href":"https://github.com/globus/globus-cli/pull/384#discussion_r171068392"},"pull_request":{"href":"https://api.github.com/repos/globus/globus-cli/pulls/384"}},"in_reply_to_id":171063458},"pull_request":{"url":"https://api.github.com/repos/globus/globus-cli/pulls/384","id":171777841,"html_url":"https://github.com/globus/globus-cli/pull/384","diff_url":"https://github.com/globus/globus-cli/pull/384.diff","patch_url":"https://github.com/globus/globus-cli/pull/384.patch","issue_url":"https://api.github.com/repos/globus/globus-cli/issues/384","number":384,"state":"open","locked":false,"title":"Add --filter option to `globus ls`","user":{"login":"sirosen","id":1300022,"avatar_url":"https://avatars3.githubusercontent.com/u/1300022?v=4","gravatar_id":"","url":"https://api.github.com/users/sirosen","html_url":"https://github.com/sirosen","followers_url":"https://api.github.com/users/sirosen/followers","following_url":"https://api.github.com/users/sirosen/following{/other_user}","gists_url":"https://api.github.com/users/sirosen/gists{/gist_id}","starred_url":"https://api.github.com/users/sirosen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sirosen/subscriptions","organizations_url":"https://api.github.com/users/sirosen/orgs","repos_url":"https://api.github.com/users/sirosen/repos","events_url":"https://api.github.com/users/sirosen/events{/privacy}","received_events_url":"https://api.github.com/users/sirosen/received_events","type":"User","site_admin":false},"body":"`--filter` allows for the use of wildcards, so people can match on things like `~*.tiff` or `!~exemptme-*`.\r\nRather than trying to handle escaped `:` and `/` characters, just reject these outright.\r\n\r\nUpdates `globus ls -h` to print a helpdoc explaining the different\r\n`--filter` options -- basically document the various API filter behaviors.\r\n\r\nIncludes doc updates and examples.\r\n\r\nCloses #349, #192","created_at":"2018-02-27T20:38:32Z","updated_at":"2018-02-27T21:15:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"533384083c2fdac981926082147018334cf848bc","assignee":null,"assignees":[],"requested_reviewers":[{"login":"jaswilli","id":214142,"avatar_url":"https://avatars1.githubusercontent.com/u/214142?v=4","gravatar_id":"","url":"https://api.github.com/users/jaswilli","html_url":"https://github.com/jaswilli","followers_url":"https://api.github.com/users/jaswilli/followers","following_url":"https://api.github.com/users/jaswilli/following{/other_user}","gists_url":"https://api.github.com/users/jaswilli/gists{/gist_id}","starred_url":"https://api.github.com/users/jaswilli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaswilli/subscriptions","organizations_url":"https://api.github.com/users/jaswilli/orgs","repos_url":"https://api.github.com/users/jaswilli/repos","events_url":"https://api.github.com/users/jaswilli/events{/privacy}","received_events_url":"https://api.github.com/users/jaswilli/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/globus/globus-cli/pulls/384/commits","review_comments_url":"https://api.github.com/repos/globus/globus-cli/pulls/384/comments","review_comment_url":"https://api.github.com/repos/globus/globus-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/globus/globus-cli/issues/384/comments","statuses_url":"https://api.github.com/repos/globus/globus-cli/statuses/d4e22997df2e76a12135cb37626b486cf3171ecb","head":{"label":"sirosen:ls-filter","ref":"ls-filter","sha":"d4e22997df2e76a12135cb37626b486cf3171ecb","user":{"login":"sirosen","id":1300022,"avatar_url":"https://avatars3.githubusercontent.com/u/1300022?v=4","gravatar_id":"","url":"https://api.github.com/users/sirosen","html_url":"https://github.com/sirosen","followers_url":"https://api.github.com/users/sirosen/followers","following_url":"https://api.github.com/users/sirosen/following{/other_user}","gists_url":"https://api.github.com/users/sirosen/gists{/gist_id}","starred_url":"https://api.github.com/users/sirosen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sirosen/subscriptions","organizations_url":"https://api.github.com/users/sirosen/orgs","repos_url":"https://api.github.com/users/sirosen/repos","events_url":"https://api.github.com/users/sirosen/events{/privacy}","received_events_url":"https://api.github.com/users/sirosen/received_events","type":"User","site_admin":false},"repo":{"id":69377442,"name":"globus-cli","full_name":"sirosen/globus-cli","owner":{"login":"sirosen","id":1300022,"avatar_url":"https://avatars3.githubusercontent.com/u/1300022?v=4","gravatar_id":"","url":"https://api.github.com/users/sirosen","html_url":"https://github.com/sirosen","followers_url":"https://api.github.com/users/sirosen/followers","following_url":"https://api.github.com/users/sirosen/following{/other_user}","gists_url":"https://api.github.com/users/sirosen/gists{/gist_id}","starred_url":"https://api.github.com/users/sirosen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sirosen/subscriptions","organizations_url":"https://api.github.com/users/sirosen/orgs","repos_url":"https://api.github.com/users/sirosen/repos","events_url":"https://api.github.com/users/sirosen/events{/privacy}","received_events_url":"https://api.github.com/users/sirosen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sirosen/globus-cli","description":"A Command Line Wrapper over the Globus SDK for Python","fork":true,"url":"https://api.github.com/repos/sirosen/globus-cli","forks_url":"https://api.github.com/repos/sirosen/globus-cli/forks","keys_url":"https://api.github.com/repos/sirosen/globus-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sirosen/globus-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sirosen/globus-cli/teams","hooks_url":"https://api.github.com/repos/sirosen/globus-cli/hooks","issue_events_url":"https://api.github.com/repos/sirosen/globus-cli/issues/events{/number}","events_url":"https://api.github.com/repos/sirosen/globus-cli/events","assignees_url":"https://api.github.com/repos/sirosen/globus-cli/assignees{/user}","branches_url":"https://api.github.com/repos/sirosen/globus-cli/branches{/branch}","tags_url":"https://api.github.com/repos/sirosen/globus-cli/tags","blobs_url":"https://api.github.com/repos/sirosen/globus-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sirosen/globus-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sirosen/globus-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/sirosen/globus-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sirosen/globus-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/sirosen/globus-cli/languages","stargazers_url":"https://api.github.com/repos/sirosen/globus-cli/stargazers","contributors_url":"https://api.github.com/repos/sirosen/globus-cli/contributors","subscribers_url":"https://api.github.com/repos/sirosen/globus-cli/subscribers","subscription_url":"https://api.github.com/repos/sirosen/globus-cli/subscription","commits_url":"https://api.github.com/repos/sirosen/globus-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/sirosen/globus-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/sirosen/globus-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/sirosen/globus-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/sirosen/globus-cli/contents/{+path}","compare_url":"https://api.github.com/repos/sirosen/globus-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sirosen/globus-cli/merges","archive_url":"https://api.github.com/repos/sirosen/globus-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sirosen/globus-cli/downloads","issues_url":"https://api.github.com/repos/sirosen/globus-cli/issues{/number}","pulls_url":"https://api.github.com/repos/sirosen/globus-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/sirosen/globus-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/sirosen/globus-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sirosen/globus-cli/labels{/name}","releases_url":"https://api.github.com/repos/sirosen/globus-cli/releases{/id}","deployments_url":"https://api.github.com/repos/sirosen/globus-cli/deployments","created_at":"2016-09-27T16:38:04Z","updated_at":"2016-09-27T16:38:05Z","pushed_at":"2018-02-27T20:45:35Z","git_url":"git://github.com/sirosen/globus-cli.git","ssh_url":"git@github.com:sirosen/globus-cli.git","clone_url":"https://github.com/sirosen/globus-cli.git","svn_url":"https://github.com/sirosen/globus-cli","homepage":null,"size":983,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"globus:master","ref":"master","sha":"02a9c38dac8c18ba40bfb5dece78e6428af0c702","user":{"login":"globus","id":6120321,"avatar_url":"https://avatars2.githubusercontent.com/u/6120321?v=4","gravatar_id":"","url":"https://api.github.com/users/globus","html_url":"https://github.com/globus","followers_url":"https://api.github.com/users/globus/followers","following_url":"https://api.github.com/users/globus/following{/other_user}","gists_url":"https://api.github.com/users/globus/gists{/gist_id}","starred_url":"https://api.github.com/users/globus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/globus/subscriptions","organizations_url":"https://api.github.com/users/globus/orgs","repos_url":"https://api.github.com/users/globus/repos","events_url":"https://api.github.com/users/globus/events{/privacy}","received_events_url":"https://api.github.com/users/globus/received_events","type":"Organization","site_admin":false},"repo":{"id":53438969,"name":"globus-cli","full_name":"globus/globus-cli","owner":{"login":"globus","id":6120321,"avatar_url":"https://avatars2.githubusercontent.com/u/6120321?v=4","gravatar_id":"","url":"https://api.github.com/users/globus","html_url":"https://github.com/globus","followers_url":"https://api.github.com/users/globus/followers","following_url":"https://api.github.com/users/globus/following{/other_user}","gists_url":"https://api.github.com/users/globus/gists{/gist_id}","starred_url":"https://api.github.com/users/globus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/globus/subscriptions","organizations_url":"https://api.github.com/users/globus/orgs","repos_url":"https://api.github.com/users/globus/repos","events_url":"https://api.github.com/users/globus/events{/privacy}","received_events_url":"https://api.github.com/users/globus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/globus/globus-cli","description":"A Command Line Wrapper over the Globus SDK for Python","fork":false,"url":"https://api.github.com/repos/globus/globus-cli","forks_url":"https://api.github.com/repos/globus/globus-cli/forks","keys_url":"https://api.github.com/repos/globus/globus-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/globus/globus-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/globus/globus-cli/teams","hooks_url":"https://api.github.com/repos/globus/globus-cli/hooks","issue_events_url":"https://api.github.com/repos/globus/globus-cli/issues/events{/number}","events_url":"https://api.github.com/repos/globus/globus-cli/events","assignees_url":"https://api.github.com/repos/globus/globus-cli/assignees{/user}","branches_url":"https://api.github.com/repos/globus/globus-cli/branches{/branch}","tags_url":"https://api.github.com/repos/globus/globus-cli/tags","blobs_url":"https://api.github.com/repos/globus/globus-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/globus/globus-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/globus/globus-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/globus/globus-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/globus/globus-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/globus/globus-cli/languages","stargazers_url":"https://api.github.com/repos/globus/globus-cli/stargazers","contributors_url":"https://api.github.com/repos/globus/globus-cli/contributors","subscribers_url":"https://api.github.com/repos/globus/globus-cli/subscribers","subscription_url":"https://api.github.com/repos/globus/globus-cli/subscription","commits_url":"https://api.github.com/repos/globus/globus-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/globus/globus-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/globus/globus-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/globus/globus-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/globus/globus-cli/contents/{+path}","compare_url":"https://api.github.com/repos/globus/globus-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/globus/globus-cli/merges","archive_url":"https://api.github.com/repos/globus/globus-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/globus/globus-cli/downloads","issues_url":"https://api.github.com/repos/globus/globus-cli/issues{/number}","pulls_url":"https://api.github.com/repos/globus/globus-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/globus/globus-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/globus/globus-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/globus/globus-cli/labels{/name}","releases_url":"https://api.github.com/repos/globus/globus-cli/releases{/id}","deployments_url":"https://api.github.com/repos/globus/globus-cli/deployments","created_at":"2016-03-08T19:25:41Z","updated_at":"2018-02-27T16:03:31Z","pushed_at":"2018-02-27T20:38:33Z","git_url":"git://github.com/globus/globus-cli.git","ssh_url":"git@github.com:globus/globus-cli.git","clone_url":"https://github.com/globus/globus-cli.git","svn_url":"https://github.com/globus/globus-cli","homepage":null,"size":941,"stargazers_count":13,"watchers_count":13,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":10,"mirror_url":null,"archived":false,"open_issues_count":19,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":10,"open_issues":19,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/globus/globus-cli/pulls/384"},"html":{"href":"https://github.com/globus/globus-cli/pull/384"},"issue":{"href":"https://api.github.com/repos/globus/globus-cli/issues/384"},"comments":{"href":"https://api.github.com/repos/globus/globus-cli/issues/384/comments"},"review_comments":{"href":"https://api.github.com/repos/globus/globus-cli/pulls/384/comments"},"review_comment":{"href":"https://api.github.com/repos/globus/globus-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/globus/globus-cli/pulls/384/commits"},"statuses":{"href":"https://api.github.com/repos/globus/globus-cli/statuses/d4e22997df2e76a12135cb37626b486cf3171ecb"}},"author_association":"OWNER"}}
{"actor":{"display_login":"sirosen"}}