1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-03-19 17:18:42 +00:00
thefuck/thefuck/rules/cd_parent.py

17 lines
341 B
Python
Raw Normal View History

2015-04-17 22:14:01 +02:00
# Adds the missing space between the cd command and the target directory
# when trying to cd to the parent directory.
#
# Does not really save chars, but is fun :D
#
# Example:
# > cd..
# cd..: command not found
2015-04-17 22:14:01 +02:00
def match(command, settings):
return command.script == 'cd..'
2015-04-17 22:14:01 +02:00
def get_new_command(command, settings):
return 'cd ..'