File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -3254,13 +3254,12 @@ def default(self, statement: Statement) -> bool | None: # type: ignore[override
3254
3254
if self .default_to_shell :
3255
3255
if 'shell' not in self .exclude_from_history :
3256
3256
self .history .append (statement )
3257
-
3258
3257
return self .do_shell (statement .command_and_args )
3258
+
3259
3259
err_msg = self .default_error .format (statement .command )
3260
3260
if self .suggest_similar_command and (suggested_command := self ._suggest_similar_command (statement .command )):
3261
3261
err_msg += f"\n { self .default_suggestion_message .format (suggested_command )} "
3262
3262
3263
- # Set apply_style to False so styles for default_error and default_suggestion_message are not overridden
3264
3263
self .perror (err_msg , style = None )
3265
3264
return None
3266
3265
@@ -4099,8 +4098,6 @@ def do_help(self, args: argparse.Namespace) -> None:
4099
4098
# If there is no help information then print an error
4100
4099
else :
4101
4100
err_msg = self .help_error .format (args .command )
4102
-
4103
- # Set apply_style to False so help_error's style is not overridden
4104
4101
self .perror (err_msg , style = None )
4105
4102
self .last_result = False
4106
4103
You can’t perform that action at this time.
0 commit comments