#289: Add is a directory pattern to cp_omitting_directory rule

This commit is contained in:
nvbn
2015-07-15 07:12:07 +03:00
parent 464f86eccf
commit 934099fe9e
2 changed files with 18 additions and 9 deletions
+2 -1
View File
@@ -4,8 +4,9 @@ from thefuck.utils import sudo_support
@sudo_support
def match(command, settings):
stderr = command.stderr.lower()
return command.script.startswith('cp ') \
and 'cp: omitting directory' in command.stderr.lower()
and ('omitting directory' in stderr or 'is a directory' in stderr)
@sudo_support