]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
yasnippets for shell-mode and eshell-mode
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Fri, 18 Dec 2015 14:17:05 +0000 (15:17 +0100)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Fri, 18 Dec 2015 14:17:05 +0000 (15:17 +0100)
- first snippets for aws cli

snippets/eshell-mode/aws-ec2-get-dns-names [new file with mode: 0644]
snippets/eshell-mode/aws-ec2-instance-running [new file with mode: 0644]
snippets/sh-mode/.yas-parents [new file with mode: 0644]
snippets/shell-mode/.yas-parents [new file with mode: 0644]

diff --git a/snippets/eshell-mode/aws-ec2-get-dns-names b/snippets/eshell-mode/aws-ec2-get-dns-names
new file mode 100644 (file)
index 0000000..1548c51
--- /dev/null
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: aws-ec2-get-dns-names
+# key: aws-ec2-get-dns-names
+# --
+aws --profile=${1:$$(yas-choose-value '("prod" "test"))} ec2 describe-instances --filters "Name=tag:Name,Values=$2" --query "Reservations[].Instances[?State.Name=='running'].[InstanceId, PublicDnsName]" --output ${3:$$(yas-choose-value '("table" "text" "json"))} $0
diff --git a/snippets/eshell-mode/aws-ec2-instance-running b/snippets/eshell-mode/aws-ec2-instance-running
new file mode 100644 (file)
index 0000000..c12b789
--- /dev/null
@@ -0,0 +1,5 @@
+# -*- mode: snippet -*-
+# name: aws-ec2-instance-running
+# key: aws-ec2-instance-running
+# --
+aws --profile=${1:$$(yas-choose-value '("prod" "test"))} ec2 describe-instances --instance-ids $2 --query "Reservations[].Instances[].[InstanceId, State.Name]" --output ${3:$$(yas-choose-value '("table" "text" "json"))} $0
diff --git a/snippets/sh-mode/.yas-parents b/snippets/sh-mode/.yas-parents
new file mode 100644 (file)
index 0000000..2de397c
--- /dev/null
@@ -0,0 +1 @@
+eshell-mode
diff --git a/snippets/shell-mode/.yas-parents b/snippets/shell-mode/.yas-parents
new file mode 100644 (file)
index 0000000..2de397c
--- /dev/null
@@ -0,0 +1 @@
+eshell-mode