-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.sawsrc
74 lines (62 loc) · 2.75 KB
/
.sawsrc
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
68
69
70
71
72
73
74
[main]
# Visual theme. Possible values: manni, igor, xcode, vim, autumn, vs, rrt,
# native, perldoc, borland, tango, emacs, friendly, monokai, paraiso-dark,
# colorful, murphy, bw, pastie, paraiso-light, trac, default, fruity
theme = vim
# Use color output mode.
color_output = True
# Use fuzzy matching mode for resources (default is to use simple substring match).
fuzzy_match = True
# Use shortcut matching mode
shortcut_match = True
# log_file location.
log_file = ~/.saws.log
# Default log level. Possible values: "CRITICAL", "ERROR", "WARNING", "INFO"
# and "DEBUG".
log_level = INFO
refresh_instance_ids = True
refresh_instance_tags = True
refresh_bucket_names = True
[shortcuts]
# Shortcut entries in this file follow the form:
# 'shortcut command' = 'full command'
# Once a shortcut command is found, the corresponding full command is
# substituted and matching stops. Only one shortcut per command is supported.
# Shortcuts are evaluated top to bottom, so place more complex
# shortcuts near the top and simpler shortcuts near the bottom.
# Currently, shortcuts are only shown after the user types 'aws' as the
# first command and the user is currently inputting the subcommand:
# aws [show shortcut matches]
# Shortcuts optionally support fuzzy completion.
# Simple shortcut demonstration to replace describe-instances with ls
# Running the following command will kick off fuzzy auto-completion:
# aws ec2ls
ec2 ls --instance-ids = ec2 describe-instances --instance-ids
# The following entries are placed here solely for easy fuzzy autocompletion
# For example: the following commands will kick off fuzzy auto-completion:
# aws ec2start
# aws ec2stop
ec2 start-instances --instance-ids = ec2 start-instances --instance-ids
ec2 stop-instances --instance-ids = ec2 stop-instances --instance-ids
# The following commands will kick off fuzzy auto-completion:
# aws ec2tagkey
# aws ec2tagval
# These shortcuts support a string substitution:
# aws ls --ec2-tag-key [tag-key]
# aws ls --ec2-tag-value [tag-value]
# Example input:
# aws ls --ec2-tag-key Stack
# Example result:
# 'ec2 ls --ec2-tag-key' = 'ec2 describe-instances --filters "Name=tag-key,Values=Stack"'
ec2 ls --ec2-tag-key = 'ec2 describe-instances --filters "Name=tag-key,Values=%s"'
ec2 ls --ec2-tag-value = 'ec2 describe-instances --filters "Name=tag-value,Values=%s"'
# Saws will auto-complete the following --ec2-state auto-completions:
# [pending | running | shutting-down | terminated | stopping | stopped]
# Usage:
# ec2 ls --ec2-state
ec2 ls --ec2-state = 'ec2 describe-instances --filters "Name=instance-state-name,Values=%s"'
# Place simpler shortcuts near the bottom
ec2 ls = ec2 describe-instances
emr ls = emr list-clusters
elb ls = elb describe-load-balancers
dynamodb ls = dynamodb list-tables