From 99e418f852f5e6e5269cbe31cf6e7329feba379c Mon Sep 17 00:00:00 2001 From: Lars Michelsen Date: Fri, 17 Apr 2015 22:14:01 +0200 Subject: [PATCH] Added rule for misspelled cd.. command --- thefuck/rules/cd_parent.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 thefuck/rules/cd_parent.py diff --git a/thefuck/rules/cd_parent.py b/thefuck/rules/cd_parent.py new file mode 100644 index 0000000..fdeb692 --- /dev/null +++ b/thefuck/rules/cd_parent.py @@ -0,0 +1,14 @@ +# 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 + +def match(command, settings): + return command.script == 'cd..' + +def get_new_command(command, settings): + return 'cd ..'