{"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":7,"created_at":"2016-02-10T09:58:36Z","updated_at":"2016-02-13T19:53:28Z","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/183741016","html_url":"https://github.com/abo-abo/swiper/issues/385#issuecomment-183741016","issue_url":"https://api.github.com/repos/abo-abo/swiper/issues/385","id":183741016,"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-13T19:53:28Z","updated_at":"2016-02-13T19:53:28Z","body":"`mdfind` is the backend of `spotlight` on Mac OS, so it's installed by default. See https://en.wikipedia.org/wiki/Spotlight_(software)\r\n\r\n`locate` is installed by default too.\r\n\r\nThose are the killer advantages of `mdfind` for me:\r\n- It is integrated with the filesystem so it gets updated automatically. You create a folder and it is already indexed. There's no need to update a database.\r\n- It is very familiar for `OS X` users, because `spotlight` is widely used and it is its backend\r\n- It works out of the box, there's no need to create the database\r\n\r\nI found `mdfind`'s results considerably better.\r\nFor example, I know I have a file that has `git` and `org` is its name, but I don't remember its location. I want to open it. Results:\r\n\r\n```\r\nAndres-MacBook-Air:~ andre0991$ mdfind -name git org\r\n/Users/andre0991/Dropbox/ciencia_da_computacao/org/git.org\r\n/Users/andre0991/Library/Caches/Metadata/Safari/History/https:%2F%2Fgithub.com%2Fsyl20bnr%2Fspacemacs%2Fissues%2F1218.webhistory\r\n/Users/andre0991/Library/Caches/Metadata/Safari/History/https:%2F%2Fgithub.com%2Farduino-org%2FArduino%2Fissues%2F2.webhistory\r\n```\r\nSearching the same string with `locate` results in 59112 results, and the top ones are not what I want.\r\n\r\nI actually stopped using `find-files` because I can just type the file or directory name using `mdfind` (with Ivy or Helm, of course) and get the right result.\r\n\r\nI could go on and show more examples but it would be great if some OS X users say what they think about this proposal here."}}