1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-01-18 12:06:04 +00:00

Add special error message for 'shit' alias

I wanted to add a pattern for ways to make more funny aliases like No
fucks given and I figured shit was a fun one to start with.
This commit is contained in:
Nate Holland 2017-11-17 14:44:56 -06:00
parent d582159670
commit 5a701bc9bd

View File

@ -70,8 +70,14 @@ def select_command(corrected_commands):
try:
selector = CommandSelector(corrected_commands)
except NoRuleMatched:
logs.failed('No fucks given' if get_alias() == 'fuck'
else 'Nothing found')
alias = get_alias()
if alias == 'fuck':
message = 'No fucks given'
elif alias == 'shit':
message = 'Don\'t give a shit'
else:
message = 'Nothing found'
logs.failed(message)
return
if not settings.require_confirmation: