pay-respects/rules/touch.toml

23 lines
371 B
TOML
Raw Permalink Normal View History

2023-08-07 18:35:07 +02:00
command = "touch"
[[match_err]]
2024-12-07 02:29:58 +01:00
pattern = [ "no such file or directory" ]
2023-08-07 18:35:07 +02:00
suggest = [
'''
2025-04-05 01:15:41 +02:00
#[!shell(nu)]
mkdir -p {{cmd::(?:\s)+(.*[\\\/])(?:\s)*}} &&
2023-08-07 18:35:07 +02:00
touch {{command[1:]}} '''
]
[[match_err]]
2025-04-05 01:15:41 +02:00
pattern = [
"nu::shell::create_not_possible",
"no such file or directory",
]
suggest = [
'''
2025-04-05 01:15:41 +02:00
#[shell(nu)]
mkdir {{cmd::(?:\s)+(.*[\\\/])(?:\s)*}};
touch {{command[1:]}} '''
]