feat: length condition

This commit is contained in:
iff 2023-08-16 14:27:40 +02:00
parent 35418e3b2b
commit 15c957e7da
3 changed files with 27 additions and 4 deletions

17
rules/c_typo.toml Normal file
View file

@ -0,0 +1,17 @@
command = "c"
[[match_err]]
pattern = [
"command not found",
"unknown command",
"nu::shell::external_command"
]
suggest = [
'''
#[length(2)]
cd {{command[1:]}} ''',
'''
#[min_length(3)]
cp {{command[1:]}} '''
]