mirror of
https://github.com/nvbn/thefuck.git
synced 2025-10-30 06:34:09 +00:00
Merge pull request #8 from LaMi-/master
Adds rule for cd.. and .gitignore for vim tmp files
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -58,3 +58,6 @@ target/
|
||||
|
||||
.env
|
||||
.idea
|
||||
|
||||
# vim temporary files
|
||||
.*.swp
|
||||
|
||||
14
thefuck/rules/cd_parent.py
Normal file
14
thefuck/rules/cd_parent.py
Normal file
@@ -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 ..'
|
||||
Reference in New Issue
Block a user