{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/PathPicker/issues/163","labels_url":"https://api.github.com/repos/facebook/PathPicker/issues/163/labels{/name}","comments_url":"https://api.github.com/repos/facebook/PathPicker/issues/163/comments","events_url":"https://api.github.com/repos/facebook/PathPicker/issues/163/events","html_url":"https://github.com/facebook/PathPicker/issues/163","id":89411526,"number":163,"title":"Can not handle files with spaces in their filenames. 0.6.1","user":{"login":"chishui","id":637584,"avatar_url":"https://avatars.githubusercontent.com/u/637584?v=3","gravatar_id":"","url":"https://api.github.com/users/chishui","html_url":"https://github.com/chishui","followers_url":"https://api.github.com/users/chishui/followers","following_url":"https://api.github.com/users/chishui/following{/other_user}","gists_url":"https://api.github.com/users/chishui/gists{/gist_id}","starred_url":"https://api.github.com/users/chishui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chishui/subscriptions","organizations_url":"https://api.github.com/users/chishui/orgs","repos_url":"https://api.github.com/users/chishui/repos","events_url":"https://api.github.com/users/chishui/events{/privacy}","received_events_url":"https://api.github.com/users/chishui/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-18T22:22:53Z","updated_at":"2015-06-19T19:29:37Z","closed_at":null,"body":"Use \"ls -la | fpp\" in a directory and if the directory has files which names have spaces, fpp can not get the right file names. So these files are unselectable(as shown in the attached image\r\n![0335e4d2-a790-497b-a919-285aa17f5f98](https://cloud.githubusercontent.com/assets/637584/8243401/9be1ec00-15cb-11e5-9933-ae0010ea5b61.png)\r\n)\r\n\r\nI checked the source code and found that in parse.py, only MASTER_REGEX_WITH_SPACES has the ability to parse filename like \"a b c.txt\". But this regex can only parse string with back slash like \"/hello/world/a b c.txt\". When I execute \"ls\", the only thing fpp can have is filename without any \"/\".\r\n\r\nI think this can be solved in two ways:\r\n1. change MASTER_REGEX_WITH_SPACES from \"(([a-z.A-Z0-9\\-_]|\\s[a-zA-Z0-9\\-_])+\\/)+\" to \"(([a-z.A-Z0-9\\-_]|\\s[a-zA-Z0-9\\-_])+\\/)*\"\r\n2. call prependDir() before call matchLine()"},"comment":{"url":"https://api.github.com/repos/facebook/PathPicker/issues/comments/113614681","html_url":"https://github.com/facebook/PathPicker/issues/163#issuecomment-113614681","issue_url":"https://api.github.com/repos/facebook/PathPicker/issues/163","id":113614681,"user":{"login":"pcottle","id":1135007,"avatar_url":"https://avatars.githubusercontent.com/u/1135007?v=3","gravatar_id":"","url":"https://api.github.com/users/pcottle","html_url":"https://github.com/pcottle","followers_url":"https://api.github.com/users/pcottle/followers","following_url":"https://api.github.com/users/pcottle/following{/other_user}","gists_url":"https://api.github.com/users/pcottle/gists{/gist_id}","starred_url":"https://api.github.com/users/pcottle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcottle/subscriptions","organizations_url":"https://api.github.com/users/pcottle/orgs","repos_url":"https://api.github.com/users/pcottle/repos","events_url":"https://api.github.com/users/pcottle/events{/privacy}","received_events_url":"https://api.github.com/users/pcottle/received_events","type":"User","site_admin":false},"created_at":"2015-06-19T19:29:37Z","updated_at":"2015-06-19T19:29:37Z","body":"Yeah this is somewhat intentional for the REGEX_WITH_SPACES regex. otherwise we would parse almost **everything** in the stdin as a potential file and have to drop down to the filesystem to check if its a file or not. imagine if we were checking `xiuliyun` or `staff` or random bits of code in a `git diff` output\r\n\r\nill debug this though and see if we can selectively prepend a `./` and try to grab out the file. just worth mentioning it has performance considerations which is why we didnt just open up the flood gates from the getgo"}}