summaryrefslogtreecommitdiff
path: root/plugins/cloudapp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/cloudapp')
-rw-r--r--plugins/cloudapp/README.md24
-rw-r--r--plugins/cloudapp/cloudapp.plugin.zsh8
2 files changed, 30 insertions, 2 deletions
diff --git a/plugins/cloudapp/README.md b/plugins/cloudapp/README.md
new file mode 100644
index 000000000..62975a631
--- /dev/null
+++ b/plugins/cloudapp/README.md
@@ -0,0 +1,24 @@
+# CloudApp plugin
+
+[CloudApp](https://www.getcloudapp.com) brings screen recording, screenshots, and GIF creation to the cloud, in an easy-to-use enterprise-level app. The CloudApp plugin allows you to upload a file to your CloadApp account from the command line.
+
+To use it, add `cloudapp` to the plugins array of your `~/.zshrc` file:
+
+```
+plugins=(... dash)
+```
+
+## Requirements
+
+1. [Aaron Russell's `cloudapp_api` gem](https://github.com/aaronrussell/cloudapp_api#installation)
+
+2. That you set your CloudApp credentials in `~/.cloudapp` as a simple text file like below:
+ ```
+ email
+ password
+ ```
+
+## Usage
+
+- `cloudapp <filename>`: uploads `<filename>` to your CloudApp account, and if you're using
+ macOS, copies the URL to your clipboard.
diff --git a/plugins/cloudapp/cloudapp.plugin.zsh b/plugins/cloudapp/cloudapp.plugin.zsh
index 99252f690..3b363c81b 100644
--- a/plugins/cloudapp/cloudapp.plugin.zsh
+++ b/plugins/cloudapp/cloudapp.plugin.zsh
@@ -1,2 +1,6 @@
-#!/bin/zsh
-alias cloudapp=$ZSH/plugins/cloudapp/cloudapp.rb
+alias cloudapp="${0:a:h}/cloudapp.rb"
+
+# Ensure only the owner can access the credentials file
+if [[ -f ~/.cloudapp ]]; then
+ chmod 600 ~/.cloudapp
+fi