mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2026-02-02 07:35:10 +01:00
rules: cd and cat
This commit is contained in:
parent
48becb3e67
commit
87fa88891b
2 changed files with 35 additions and 0 deletions
21
rules/cat.toml
Normal file
21
rules/cat.toml
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
command = "cat"
|
||||||
|
|
||||||
|
[[match_err]]
|
||||||
|
pattern = [
|
||||||
|
"no such file or directory"
|
||||||
|
]
|
||||||
|
suggest = [
|
||||||
|
'''
|
||||||
|
cat {{typo[1](file)}}
|
||||||
|
'''
|
||||||
|
]
|
||||||
|
|
||||||
|
[[match_err]]
|
||||||
|
pattern = [
|
||||||
|
"is a directory"
|
||||||
|
]
|
||||||
|
suggest = [
|
||||||
|
'''
|
||||||
|
ls {{command[1:]}} --almost-all --color=auto --group-directories-first
|
||||||
|
'''
|
||||||
|
]
|
||||||
14
rules/cd.toml
Normal file
14
rules/cd.toml
Normal 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]}}
|
||||||
|
'''
|
||||||
|
]
|
||||||
Loading…
Add table
Add a link
Reference in a new issue