{"action":"created","issue":{"url":"https://api.github.com/repos/abo-abo/swiper/issues/385","repository_url":"https://api.github.com/repos/abo-abo/swiper","labels_url":"https://api.github.com/repos/abo-abo/swiper/issues/385/labels{/name}","comments_url":"https://api.github.com/repos/abo-abo/swiper/issues/385/comments","events_url":"https://api.github.com/repos/abo-abo/swiper/issues/385/events","html_url":"https://github.com/abo-abo/swiper/issues/385","id":132652946,"number":385,"title":"Feature request: Make counsel-locate command configurable","user":{"login":"Andre0991","id":7083061,"avatar_url":"https://avatars.githubusercontent.com/u/7083061?v=3","gravatar_id":"","url":"https://api.github.com/users/Andre0991","html_url":"https://github.com/Andre0991","followers_url":"https://api.github.com/users/Andre0991/followers","following_url":"https://api.github.com/users/Andre0991/following{/other_user}","gists_url":"https://api.github.com/users/Andre0991/gists{/gist_id}","starred_url":"https://api.github.com/users/Andre0991/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Andre0991/subscriptions","organizations_url":"https://api.github.com/users/Andre0991/orgs","repos_url":"https://api.github.com/users/Andre0991/repos","events_url":"https://api.github.com/users/Andre0991/events{/privacy}","received_events_url":"https://api.github.com/users/Andre0991/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2016-02-10T09:58:36Z","updated_at":"2016-02-18T17:26:02Z","closed_at":null,"body":"Currently `locate` is hardcoded, so it's not possible to change the command that `counsel-locate` uses.\r\nThis is inconvenient for OS X and Windows users, as the former might want to use `mdfind`, and the latter `everything`.\r\n\r\nReasons to use `mdfind`:\r\n- It's Spotlight's backend, so using it feels very consistent and natural;\r\n- `locate` won't work unless the user manually starts the database. `mdfind` works out of the box.\r\n- its indexing is updated as the file system changes, ie changes are immediately detected and indexed.\r\n\r\nI propose two things:\r\n- Making the command configurable - in my case, I'd like to set it to `mdfind`\r\n- Auto detecting the OS and setting the appropriate command - it's quite easy to implement and it makes sense: If a Windows user installed `everything`, of course he will want to use it (otherwise `counsel-locate` is useless for him); if I'm a OS X user, `mdfind` is much better and works out of the box.\r\n\r\nIf you agree with my second suggestion, I recommend using the `-name` parameter on `mdfind` - it searches only on filenames (and not content), which makes the search much faster."},"comment":{"url":"https://api.github.com/repos/abo-abo/swiper/issues/comments/185824891","html_url":"https://github.com/abo-abo/swiper/issues/385#issuecomment-185824891","issue_url":"https://api.github.com/repos/abo-abo/swiper/issues/385","id":185824891,"user":{"login":"Andre0991","id":7083061,"avatar_url":"https://avatars.githubusercontent.com/u/7083061?v=3","gravatar_id":"","url":"https://api.github.com/users/Andre0991","html_url":"https://github.com/Andre0991","followers_url":"https://api.github.com/users/Andre0991/followers","following_url":"https://api.github.com/users/Andre0991/following{/other_user}","gists_url":"https://api.github.com/users/Andre0991/gists{/gist_id}","starred_url":"https://api.github.com/users/Andre0991/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Andre0991/subscriptions","organizations_url":"https://api.github.com/users/Andre0991/orgs","repos_url":"https://api.github.com/users/Andre0991/repos","events_url":"https://api.github.com/users/Andre0991/events{/privacy}","received_events_url":"https://api.github.com/users/Andre0991/received_events","type":"User","site_admin":false},"created_at":"2016-02-18T17:26:02Z","updated_at":"2016-02-18T17:26:02Z","body":"Some old versions of `locate` don't support `--regex`. `mdfind` doesn't either. I'm not sure about `es`.\r\n\r\nSo for those cases (or if the user wants to change the default command to one without `--regex`) the code from my previous post shouldn't run. How do you suggest handling this?"}}