rules: updated for nushell compatibilities

This commit is contained in:
iff 2023-08-12 23:35:00 +02:00
parent 12e4ac7093
commit 5d66f5c1ce
3 changed files with 27 additions and 6 deletions

View file

@ -1,9 +1,17 @@
command = "touch"
[[match_err]]
pattern = [ "No such file or directory" ]
pattern = [ "cannot touch" ]
suggest = [
'''
mkdir --parents {{cmd::(?:\s)+(.*[\\\/])(?:\s)*}} && \
touch {{command[1:]}} '''
]
[[match_err]]
pattern = [ "nu::shell::create_not_possible" ]
suggest = [
'''
mkdir {{cmd::(?:\s)+(.*[\\\/])(?:\s)*}} and \
touch {{command[1:]}} '''
]