pay-respects/rules/touch.toml
2025-04-05 02:44:45 +02:00

22 lines
378 B
TOML

command = "touch"
[[match_err]]
pattern = [ "no such file or directory" ]
suggest = [
'''
#[!shell(nu)]
mkdir --parents {{cmd::(?:\s)+(.*[\\\/])(?:\s)*}} &&
touch {{command[1:]}} '''
]
[[match_err]]
pattern = [
"nu::shell::create_not_possible",
"no such file or directory",
]
suggest = [
'''
#[shell(nu)]
mkdir {{cmd::(?:\s)+(.*[\\\/])(?:\s)*}};
touch {{command[1:]}} '''
]