the_silver_searcher
the_silver_searcher copied to clipboard
Where the hell is it?
I've downloaded and installed the latest release on Windows 10. A window flashed on the screen and then vanished. Then silence. Did it work? How would I know?
It's not in the Start menu, or Program Files, It's listed in Add/Remove, but with no location. There is no icon or shortcut that I can find. I can run a command called 'ag' and it says it is version 2.2.5, which is correct, but 'which' cannot find it.
I finally found it using a file search program, at C:\Windows\ag.exe. Why would you do that? Why would you not tell anyone?
Please fix.
Hello, The Silver Searcher is a command-line tool. As such, like every other command-line tool (And there are many in your version of Windows), it has no icon nor shortcut. Icons and shortcuts are for GUI tools only. The important thing is that ag.exe ends up being in the Windows PATH, and it is. But you're right for one thing: It'd be better if there were a final summary message explaining all this, to avoid misunderstandings. I'll add that to the next version.
I can run a command called 'ag' and it says it is version 2.2.5, which is correct, but 'which' cannot find it.
This is incoherent.
- The fact that you can run ag.exe confirms that it's in your PATH.
- The fact that your version of which can't find it proves that your which is broken, or that you're not using it correctly.
Actually Windows does not include a "which" command, but it does have an equivalent command called "where".
Try running where ag
, and I'm pretty sure it'll find it.
Most versions of which.exe for Windows are recompilations of which.c for Unix. They are mostly useless in Windows because they search applications using Unix rules, and not Windows rules.
If you want a version of which.exe that knows about Windows search rules. try the which.exe in https://github.com/JFLarvoire/SysToolsLib/releases/latest/download/SysTools.zip.
(But you won't like the fact that this toolbox has no setup. You'll have to extract the which.exe file, and store it in your PATH yourself. (In C:\Windows maybe :-) )
Thank you for your response. Yes, I did not know that Where could find it and that GNU Which would not. I've learned something, but that's not the point.
The point is that the Windows directory is for components of Windows (hence the name), you should never install your executable there. If it's just the one file you don't really need an installer, but if you really want one please follow the usual conventions and provide an option to select where it goes. In my case that would be the directory where my countless other command line programs reside. It's there now. but the path to get it there was longer and harder than it should have been.