Command not found should suggest how to install like in bash
See original GitHub issueSteps to reproduce
Run a command that’s not installed on your Linux machine, e.g. dtrace
.
Expected behavior
jasonsh@jasonsh-ubd02:~$ dtrace
The program 'dtrace' is currently not installed. You can install it by typing:
sudo apt-get install systemtap-sdt-dev
Actual behavior
PS> dtrace
dtrace : The term 'dtrace' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ dtrace
+ ~~~~~~
Environment data
PS /home/jasonsh> $PSVersionTable
Name Value
---- -----
PSVersion 6.0.0-alpha
PSEdition Core
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 3.0.0.0
GitCommitId v6.0.0-alpha.9
CLRVersion
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
PS /home/jasonsh> uname -v
#49~14.04.1-Ubuntu SMP Wed Jun 29 20:22:11 UTC 2016
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:13 (5 by maintainers)
Top Results From Across the Web
How to fix a "Command not found" error in Linux
5 ways to fix "Command not found" errors · 1. Include the path · 2. Add a new path · 3. Copy a...
Read more >How to Fix the “command not found” Error on Linux
1. Check for Syntax Errors · 2. Include the Path to Your Executable · 3. Use Environment Variables · 4. Make Sure That...
Read more >How to implement package install suggestion on Debian?
One is supposed to run the command update-command-not-found immediately after running apt-get install command-not-found . In fact dpkg prompts ...
Read more >Command Not Found in Bash Fixed
Bash : command not found issue fixed by modifying the PATH environment variable in order to run commands in Bash properly.
Read more >Troubleshooting "Bash: Command Not Found" Error in Linux
Method 1: Double check the command name (no, seriously) · Method 2: Ensure that the command is installed on your system · Method...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Opened https://github.com/PowerShell/PowerShellGet/issues/287, if they can get the perf down to 100ms or less, I think we can add this capability into PSCore6 (but probably need to have it timeout after 250ms to not impact the interactive experience)
I believe this functionality belongs to package management, but of course, it can/should be shipped together with PowerShell. I did proof-of-concept module which finds required information in about 20ms, so adding suggestions is not a problem. It is inspired with
apt-get update
from Linux, and it follows what Ilya described above. More information is in the issue Steve opened.