-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.yml
More file actions
67 lines (58 loc) · 1.74 KB
/
config.example.yml
File metadata and controls
67 lines (58 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Global vars - can be used in any command.
vars:
sshHost:
multi: false
# Possible option values for the variable.
options:
- localhost
- user@remote.example.com
service:
multi: false
# Options can also be derived from a command. The command should output one option per line.
options_cmd: systemctl list-units --type=service --no-legend | awk '{print $1}'
containers:
multi: true
# Delimiter used when multiple options are selected. Only affects vars with multi: true.
delimiter: " "
options_cmd: docker ps --format '{{.Names}}'
commands:
# Var references without a var definition will be prompted as free-form input.
- title: Search with Ripgrep
cmd: rg {{pattern}} {{path}} --hidden --glob '!node_modules'
- title: Follow Systemd Service Logs
cmd: journalctl {{flags}} -u {{service}} -f
vars:
flags:
required: false
multi: true
options:
- --boot
- --since "1 hour ago"
- title: SSH to Host
cmd: ssh {{sshHost}}
- title: Copy File to SSH Host
cmd: scp {{localPath}} {{sshHost}}:{{remotePath}}
vars:
remotePath:
multi: false
allowFreeform: true
options:
- /tmp
- /home/$USER
- title: Follow Docker Container Logs
cmd: docker logs -f --tail 200 {{container}}
# Local vars - they take precedence over global vars with the same name.
vars:
container:
multi: false
options_cmd: docker ps --format '{{.Names}}'
- title: Stop Docker Containers
cmd: docker stop {{containers}}
- title: Find files by extensions
cmd: find {{path}} -type f -name '*.{{ext}}'
vars:
ext:
options:
- py
- go
- js