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

@ -5,10 +5,17 @@ pattern = [
"no such file or directory",
"does not exist"
]
# as rust runs on its own environment, it's not possible to change
# the directory automatically
suggest = [
'''
mkdir -p {{command[1]}} && \
mkdir --parents {{command[1]}} && \
cd {{command[1]}} '''
]
[[match_err]]
pattern = [
"nu::shell::directory_not_found"
]
suggest = [
'''
mkdir {{command[1]}} '''
]