Did you mean this command instead? (how to reply to this)
Clash Royale CLAN TAG#URR8PPP
Suppose I entered the following thing into terminal:
wgets "link"
I will get the response:
No command 'wgets' found, did you mean:
Command 'wget' from package 'wget' (main)
I made a mistake, and the terminal warned me.
Is there a command that I can type after the terminal warned me, so that then it will execute the command above with what it thought it was?
For example:
->wgets "link"
->No command 'wgets' found, did you mean:
Command 'wget' from package 'wget' (main)
->yes (this command I am looking for ... is there one?)
-> executing wget "link"
bash shell command-line command autocorrection
|
show 5 more comments
Suppose I entered the following thing into terminal:
wgets "link"
I will get the response:
No command 'wgets' found, did you mean:
Command 'wget' from package 'wget' (main)
I made a mistake, and the terminal warned me.
Is there a command that I can type after the terminal warned me, so that then it will execute the command above with what it thought it was?
For example:
->wgets "link"
->No command 'wgets' found, did you mean:
Command 'wget' from package 'wget' (main)
->yes (this command I am looking for ... is there one?)
-> executing wget "link"
bash shell command-line command autocorrection
1
This is not a generic "shell" question. What happens in this circumstance varies from shell to shell. The Z shell differing from the Bourne Again shell differing from the Korn shell, for example. It also depends from what shell extensions are installed. Your question is describing the behaviour of a particular shell with a particular extension.
– JdeBP
Jun 23 '17 at 20:39
I don't have much knowledge of Linux, so feel free to remove tags you don't think are valid here
– K Split X
Jun 23 '17 at 20:40
1
In most cases, people take advantage of the respective shells history file here. Use the Up Arrow to type a repeat of the command, remove the mistake, and continue
– eyoung100
Jun 23 '17 at 20:46
@eyoung100 I'm aware of that, that's why I've been doing until now :P
– K Split X
Jun 23 '17 at 20:51
3
I think you wantthefuck
. ;) I wouldn't use it in Production in a million years, but it's funny.
– Wildcard
Jun 23 '17 at 22:19
|
show 5 more comments
Suppose I entered the following thing into terminal:
wgets "link"
I will get the response:
No command 'wgets' found, did you mean:
Command 'wget' from package 'wget' (main)
I made a mistake, and the terminal warned me.
Is there a command that I can type after the terminal warned me, so that then it will execute the command above with what it thought it was?
For example:
->wgets "link"
->No command 'wgets' found, did you mean:
Command 'wget' from package 'wget' (main)
->yes (this command I am looking for ... is there one?)
-> executing wget "link"
bash shell command-line command autocorrection
Suppose I entered the following thing into terminal:
wgets "link"
I will get the response:
No command 'wgets' found, did you mean:
Command 'wget' from package 'wget' (main)
I made a mistake, and the terminal warned me.
Is there a command that I can type after the terminal warned me, so that then it will execute the command above with what it thought it was?
For example:
->wgets "link"
->No command 'wgets' found, did you mean:
Command 'wget' from package 'wget' (main)
->yes (this command I am looking for ... is there one?)
-> executing wget "link"
bash shell command-line command autocorrection
bash shell command-line command autocorrection
edited Jun 25 '17 at 23:33
Gilles
535k12810811598
535k12810811598
asked Jun 23 '17 at 20:27
K Split XK Split X
3381415
3381415
1
This is not a generic "shell" question. What happens in this circumstance varies from shell to shell. The Z shell differing from the Bourne Again shell differing from the Korn shell, for example. It also depends from what shell extensions are installed. Your question is describing the behaviour of a particular shell with a particular extension.
– JdeBP
Jun 23 '17 at 20:39
I don't have much knowledge of Linux, so feel free to remove tags you don't think are valid here
– K Split X
Jun 23 '17 at 20:40
1
In most cases, people take advantage of the respective shells history file here. Use the Up Arrow to type a repeat of the command, remove the mistake, and continue
– eyoung100
Jun 23 '17 at 20:46
@eyoung100 I'm aware of that, that's why I've been doing until now :P
– K Split X
Jun 23 '17 at 20:51
3
I think you wantthefuck
. ;) I wouldn't use it in Production in a million years, but it's funny.
– Wildcard
Jun 23 '17 at 22:19
|
show 5 more comments
1
This is not a generic "shell" question. What happens in this circumstance varies from shell to shell. The Z shell differing from the Bourne Again shell differing from the Korn shell, for example. It also depends from what shell extensions are installed. Your question is describing the behaviour of a particular shell with a particular extension.
– JdeBP
Jun 23 '17 at 20:39
I don't have much knowledge of Linux, so feel free to remove tags you don't think are valid here
– K Split X
Jun 23 '17 at 20:40
1
In most cases, people take advantage of the respective shells history file here. Use the Up Arrow to type a repeat of the command, remove the mistake, and continue
– eyoung100
Jun 23 '17 at 20:46
@eyoung100 I'm aware of that, that's why I've been doing until now :P
– K Split X
Jun 23 '17 at 20:51
3
I think you wantthefuck
. ;) I wouldn't use it in Production in a million years, but it's funny.
– Wildcard
Jun 23 '17 at 22:19
1
1
This is not a generic "shell" question. What happens in this circumstance varies from shell to shell. The Z shell differing from the Bourne Again shell differing from the Korn shell, for example. It also depends from what shell extensions are installed. Your question is describing the behaviour of a particular shell with a particular extension.
– JdeBP
Jun 23 '17 at 20:39
This is not a generic "shell" question. What happens in this circumstance varies from shell to shell. The Z shell differing from the Bourne Again shell differing from the Korn shell, for example. It also depends from what shell extensions are installed. Your question is describing the behaviour of a particular shell with a particular extension.
– JdeBP
Jun 23 '17 at 20:39
I don't have much knowledge of Linux, so feel free to remove tags you don't think are valid here
– K Split X
Jun 23 '17 at 20:40
I don't have much knowledge of Linux, so feel free to remove tags you don't think are valid here
– K Split X
Jun 23 '17 at 20:40
1
1
In most cases, people take advantage of the respective shells history file here. Use the Up Arrow to type a repeat of the command, remove the mistake, and continue
– eyoung100
Jun 23 '17 at 20:46
In most cases, people take advantage of the respective shells history file here. Use the Up Arrow to type a repeat of the command, remove the mistake, and continue
– eyoung100
Jun 23 '17 at 20:46
@eyoung100 I'm aware of that, that's why I've been doing until now :P
– K Split X
Jun 23 '17 at 20:51
@eyoung100 I'm aware of that, that's why I've been doing until now :P
– K Split X
Jun 23 '17 at 20:51
3
3
I think you want
thefuck
. ;) I wouldn't use it in Production in a million years, but it's funny.– Wildcard
Jun 23 '17 at 22:19
I think you want
thefuck
. ;) I wouldn't use it in Production in a million years, but it's funny.– Wildcard
Jun 23 '17 at 22:19
|
show 5 more comments
3 Answers
3
active
oldest
votes
Switch to zsh (installed by default on macOS and available as a package on all major Linux distributions, *BSD, and software collections for other Unix-like operating systems). It has autocorrect for command names.
% wgets
zsh: correct 'wgets' to 'wget' [nyae]? y
wget: missing URL
…
add a comment |
In Bash
you can use search and replace
to modify the previously run incorrect command. From your example:
->wgets "link"
->No command 'wgets' found, did you mean:
Command 'wget' from package 'wget' (main)
->^wgets^wget^
The wgets
will be replaced with wget
and the command executed.
To facilitate this on a command from earlier in the history list:
->!wgets:s/wgets/wget/
From man 3 history
under Event Designators
:
!string
Refer to the most recent command starting with string.
...
^string1^string2^
Quick Substitution. Repeat the last command, replacing string1
with string2. Equivalent to ''!!:s/string1/string2/''.
add a comment |
As Wildcard already suggested install thefuck
and then alias "yes" to it by adding the following lines to your .bash_profile, .bashrc or .zshrc:
eval $(thefuck --alias)
alias yes="fuck"
->wgets "link"
->No command 'wgets' found, did you mean:
Command 'wget' from package 'wget' (main)
->yes
-> wget "link" [enter/↑/↓/ctrl+c]
-> Downloading...
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f373064%2fdid-you-mean-this-command-instead-how-to-reply-to-this%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Switch to zsh (installed by default on macOS and available as a package on all major Linux distributions, *BSD, and software collections for other Unix-like operating systems). It has autocorrect for command names.
% wgets
zsh: correct 'wgets' to 'wget' [nyae]? y
wget: missing URL
…
add a comment |
Switch to zsh (installed by default on macOS and available as a package on all major Linux distributions, *BSD, and software collections for other Unix-like operating systems). It has autocorrect for command names.
% wgets
zsh: correct 'wgets' to 'wget' [nyae]? y
wget: missing URL
…
add a comment |
Switch to zsh (installed by default on macOS and available as a package on all major Linux distributions, *BSD, and software collections for other Unix-like operating systems). It has autocorrect for command names.
% wgets
zsh: correct 'wgets' to 'wget' [nyae]? y
wget: missing URL
…
Switch to zsh (installed by default on macOS and available as a package on all major Linux distributions, *BSD, and software collections for other Unix-like operating systems). It has autocorrect for command names.
% wgets
zsh: correct 'wgets' to 'wget' [nyae]? y
wget: missing URL
…
answered Jun 25 '17 at 23:33
GillesGilles
535k12810811598
535k12810811598
add a comment |
add a comment |
In Bash
you can use search and replace
to modify the previously run incorrect command. From your example:
->wgets "link"
->No command 'wgets' found, did you mean:
Command 'wget' from package 'wget' (main)
->^wgets^wget^
The wgets
will be replaced with wget
and the command executed.
To facilitate this on a command from earlier in the history list:
->!wgets:s/wgets/wget/
From man 3 history
under Event Designators
:
!string
Refer to the most recent command starting with string.
...
^string1^string2^
Quick Substitution. Repeat the last command, replacing string1
with string2. Equivalent to ''!!:s/string1/string2/''.
add a comment |
In Bash
you can use search and replace
to modify the previously run incorrect command. From your example:
->wgets "link"
->No command 'wgets' found, did you mean:
Command 'wget' from package 'wget' (main)
->^wgets^wget^
The wgets
will be replaced with wget
and the command executed.
To facilitate this on a command from earlier in the history list:
->!wgets:s/wgets/wget/
From man 3 history
under Event Designators
:
!string
Refer to the most recent command starting with string.
...
^string1^string2^
Quick Substitution. Repeat the last command, replacing string1
with string2. Equivalent to ''!!:s/string1/string2/''.
add a comment |
In Bash
you can use search and replace
to modify the previously run incorrect command. From your example:
->wgets "link"
->No command 'wgets' found, did you mean:
Command 'wget' from package 'wget' (main)
->^wgets^wget^
The wgets
will be replaced with wget
and the command executed.
To facilitate this on a command from earlier in the history list:
->!wgets:s/wgets/wget/
From man 3 history
under Event Designators
:
!string
Refer to the most recent command starting with string.
...
^string1^string2^
Quick Substitution. Repeat the last command, replacing string1
with string2. Equivalent to ''!!:s/string1/string2/''.
In Bash
you can use search and replace
to modify the previously run incorrect command. From your example:
->wgets "link"
->No command 'wgets' found, did you mean:
Command 'wget' from package 'wget' (main)
->^wgets^wget^
The wgets
will be replaced with wget
and the command executed.
To facilitate this on a command from earlier in the history list:
->!wgets:s/wgets/wget/
From man 3 history
under Event Designators
:
!string
Refer to the most recent command starting with string.
...
^string1^string2^
Quick Substitution. Repeat the last command, replacing string1
with string2. Equivalent to ''!!:s/string1/string2/''.
edited Jun 23 '17 at 21:49
answered Jun 23 '17 at 21:29
Timothy MartinTimothy Martin
5,3142229
5,3142229
add a comment |
add a comment |
As Wildcard already suggested install thefuck
and then alias "yes" to it by adding the following lines to your .bash_profile, .bashrc or .zshrc:
eval $(thefuck --alias)
alias yes="fuck"
->wgets "link"
->No command 'wgets' found, did you mean:
Command 'wget' from package 'wget' (main)
->yes
-> wget "link" [enter/↑/↓/ctrl+c]
-> Downloading...
add a comment |
As Wildcard already suggested install thefuck
and then alias "yes" to it by adding the following lines to your .bash_profile, .bashrc or .zshrc:
eval $(thefuck --alias)
alias yes="fuck"
->wgets "link"
->No command 'wgets' found, did you mean:
Command 'wget' from package 'wget' (main)
->yes
-> wget "link" [enter/↑/↓/ctrl+c]
-> Downloading...
add a comment |
As Wildcard already suggested install thefuck
and then alias "yes" to it by adding the following lines to your .bash_profile, .bashrc or .zshrc:
eval $(thefuck --alias)
alias yes="fuck"
->wgets "link"
->No command 'wgets' found, did you mean:
Command 'wget' from package 'wget' (main)
->yes
-> wget "link" [enter/↑/↓/ctrl+c]
-> Downloading...
As Wildcard already suggested install thefuck
and then alias "yes" to it by adding the following lines to your .bash_profile, .bashrc or .zshrc:
eval $(thefuck --alias)
alias yes="fuck"
->wgets "link"
->No command 'wgets' found, did you mean:
Command 'wget' from package 'wget' (main)
->yes
-> wget "link" [enter/↑/↓/ctrl+c]
-> Downloading...
answered Jan 17 at 12:20
Jannis HellJannis Hell
112
112
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f373064%2fdid-you-mean-this-command-instead-how-to-reply-to-this%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
This is not a generic "shell" question. What happens in this circumstance varies from shell to shell. The Z shell differing from the Bourne Again shell differing from the Korn shell, for example. It also depends from what shell extensions are installed. Your question is describing the behaviour of a particular shell with a particular extension.
– JdeBP
Jun 23 '17 at 20:39
I don't have much knowledge of Linux, so feel free to remove tags you don't think are valid here
– K Split X
Jun 23 '17 at 20:40
1
In most cases, people take advantage of the respective shells history file here. Use the Up Arrow to type a repeat of the command, remove the mistake, and continue
– eyoung100
Jun 23 '17 at 20:46
@eyoung100 I'm aware of that, that's why I've been doing until now :P
– K Split X
Jun 23 '17 at 20:51
3
I think you want
thefuck
. ;) I wouldn't use it in Production in a million years, but it's funny.– Wildcard
Jun 23 '17 at 22:19