mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-11 22:10:09 +01:00
rules: updated for nushell compatibilities
This commit is contained in:
parent
12e4ac7093
commit
5d66f5c1ce
3 changed files with 27 additions and 6 deletions
|
|
@ -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]}} '''
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,14 +1,20 @@
|
|||
command = "rm"
|
||||
|
||||
[[match_err]]
|
||||
pattern = [ "is a directory" ]
|
||||
pattern = [
|
||||
"is a directory",
|
||||
"try --recursive"
|
||||
]
|
||||
suggest = [
|
||||
'''
|
||||
{{command}} --recursive '''
|
||||
]
|
||||
|
||||
[[match_err]]
|
||||
pattern = [ "no such file or directory" ]
|
||||
pattern = [
|
||||
"no such file or directory",
|
||||
"file(s) not found"
|
||||
]
|
||||
suggest = [
|
||||
'''
|
||||
{{command[0}} {{opt::(?:\s)-[\w]+}} {{typo[1:](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:]}} '''
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue