rules: cd and cat

This commit is contained in:
iff 2023-08-06 02:26:09 +02:00
parent 48becb3e67
commit 87fa88891b
2 changed files with 35 additions and 0 deletions

14
rules/cd.toml Normal file
View file

@ -0,0 +1,14 @@
command = "cd"
[[match_err]]
pattern = [
"no such file or directory"
]
# as rust runs on its own environment, it's not possible to change
# the directory automatically
suggest = [
'''
#[err_contains(no such file or directory)]
mkdir -p {{command[1]}}
'''
]