File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -324,12 +324,20 @@ def _not_corrected(history, tf_alias):
324324 from thefuck .shells import shell
325325 history = shell .get_history ()
326326 tf_alias = get_alias ()
327- executables = set (get_all_executables ())\
328- .union (shell .get_builtin_commands ())
329-
330- return [line for line in _not_corrected (history , tf_alias )
331- if not line .startswith (tf_alias ) and not line == command .script
332- and line .split (' ' )[0 ] in executables ]
327+ executables = set (get_all_executables ()).union (shell .get_builtin_commands ())
328+
329+ def _has_non_ascii (s ):
330+ return any (ord (ch ) > 127 for ch in s )
331+
332+ return [
333+ line for line in _not_corrected (history , tf_alias )
334+ if not line .startswith (tf_alias )
335+ and line != command .script
336+ and (
337+ line .split (' ' )[0 ] in executables
338+ or _has_non_ascii (line )
339+ )
340+ ]
333341
334342
335343def format_raw_script (raw_script ):
You can’t perform that action at this time.
0 commit comments