pay-respects/rules/cd.toml

27 lines
340 B
TOML
Raw Normal View History

2023-08-06 02:26:09 +02:00
command = "cd"
[[match_err]]
pattern = [
2023-08-12 23:09:56 +02:00
"no such file or directory",
"does not exist"
2023-08-06 02:26:09 +02:00
]
suggest = [
'''
2024-12-07 01:51:15 +01:00
cd {{typo[1](file)}}
''',
'''
#[!shell(nu)]
2025-04-05 01:15:41 +02:00
mkdir --parents {{command[1]}} &&
cd {{command[1]}} '''
2023-08-06 02:26:09 +02:00
]
[[match_err]]
pattern = [
"nu::shell::directory_not_found"
]
suggest = [
'''
mkdir {{command[1]}} and \
cd {{command[1]}} '''
]