mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2026-02-02 07:35:10 +01:00
feat: conditional suggestions
This commit is contained in:
parent
72db07051b
commit
6b4d926dde
5 changed files with 54 additions and 19 deletions
|
|
@ -48,8 +48,10 @@ suggest = "{{command[0]}} fix {{command[2:]}}"
|
|||
pattern = [
|
||||
"pattern 1",
|
||||
]
|
||||
# this will add a `sudo` before the command, without touching the rest
|
||||
suggest = "sudo {{command}}"
|
||||
# this will add a `sudo` before the command if the `sudo` is found by `which`
|
||||
suggest = '''
|
||||
#[executable(sudo)]
|
||||
sudo {{command}}'''
|
||||
```
|
||||
|
||||
The placeholder is evaluated as following:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue