Command Corrections
# Command Corrections import VideoEmbed from '@components/VideoEmbed.astro'; ## What is it This feature was built on top of the open-source project [nvdn/thefuck](https://github.com/nvbn/thefuck). Here are some examples that the Warp team usually finds Command Corrections useful for: * Misspelled commands * `gti checkout myBranchName` -> `git checkout myBranchName` * `cd ap/sorce/executtor` -> `cd app/source/executor` * Missing flags * `git push` -> `git push –set-upstream myBranchName` * Add permissions * `./script` -> `chmod +x ./script && ./script` ## How to access it * Command Corrections is enabled by default. You can disable Command Corrections by going to **Settings** > **Features** > **Terminal Input** > toggle “Suggest corrected commands”. * After an incorrect command is run, a panel with the corrected command suggestion appears above the Input Editor. `CLICK` or press the `RIGHT` arrow to insert the suggestion. ## How it works <VideoEmbed url="https://www.loom.com/share/180e1dc8d1504ec39c00694d9fd71b7c?hide_owner=true&hide_share=true&hide_title=true&hideEmbedTopBar=true" title="Command Corrections Demo" /> #### Command correction rules: | Command | | ------------------------------------------------------------- | | brew | | cargo | | cat | | cd | | chmod | | conda | | cp | | docker | | generic (command agnostic, e.g. mis-spelling executable name) | | git | | go | | grep | | java | | ls | | mkdir | | npm | | pip | | python | | sed | | sudo | | yarn |Command Corrections provides auto-correct suggestions on previously run commands to catch typos and forgotten flags, and fix general console errors.
What is it
Section titled “What is it”This feature was built on top of the open-source project nvdn/thefuck. Here are some examples that the Warp team usually finds Command Corrections useful for:
- Misspelled commands
gti checkout myBranchName->git checkout myBranchNamecd ap/sorce/executtor->cd app/source/executor
- Missing flags
git push->git push –set-upstream myBranchName
- Add permissions
./script->chmod +x ./script && ./script
How to access it
Section titled “How to access it”- Command Corrections is enabled by default. You can disable Command Corrections by going to Settings > Features > Terminal Input > toggle “Suggest corrected commands”.
- After an incorrect command is run, a panel with the corrected command suggestion appears above the Input Editor.
CLICKor press theRIGHTarrow to insert the suggestion.
How it works
Section titled “How it works”Command correction rules:
Section titled “Command correction rules:”| Command |
|---|
| brew |
| cargo |
| cat |
| cd |
| chmod |
| conda |
| cp |
| docker |
| generic (command agnostic, e.g. mis-spelling executable name) |
| git |
| go |
| grep |
| java |
| ls |
| mkdir |
| npm |
| pip |
| python |
| sed |
| sudo |
| yarn |