From: Christian Hofstaedtler <christian@hofstaedtler.name>
Date: Sun, 6 Oct 2013 20:00:40 +0200
Subject: Rename gist script to gist-paste, to not conflict with yorick.

Forwarded: not-needed
Bug-Debian: https://bugs.debian.org/722662
---
 README.md    | 68 ++++++++++++++++++++++++++++++------------------------------
 Rakefile     |  2 +-
 build/gist.1 | 58 ++++++++++++++++++++++++++-------------------------
 gist.gemspec |  2 +-
 4 files changed, 66 insertions(+), 64 deletions(-)

diff --git a/README.md b/README.md
index c55f322..7ce6a65 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,9 @@
-gist(1) -- upload code to https://gist.github.com
-=================================================
+gist-paste(1) -- upload code to https://gist.github.com
+=======================================================
 
 ## Synopsis
 
-The gist gem provides a `gist` command that you can use from your terminal to
+The gist gem provides a `gist-paste` command that you can use from your terminal to
 upload content to https://gist.github.com/.
 
 ## Installation
@@ -30,61 +30,61 @@ upload content to https://gist.github.com/.
 
 ‌To upload the contents of `a.rb` just:
 
-    gist a.rb
+    gist-paste a.rb
 
 ‌Upload multiple files:
 
-    gist a b c
-    gist *.rb
+    gist-paste a b c
+    gist-paste *.rb
 
 ‌By default it reads from STDIN, and you can set a filename with `-f`.
 
-    gist -f test.rb <a.rb
+    gist-paste -f test.rb <a.rb
 
 ‌Alternatively, you can just paste from the clipboard:
 
-    gist -P
+    gist-paste -P
 
 ‌Use `-p` to make the gist private:
 
-    gist -p a.rb
+    gist-paste -p a.rb
 
 ‌Use `-d` to add a description:
 
-    gist -d "Random rbx bug" a.rb
+    gist-paste -d "Random rbx bug" a.rb
 
 ‌You can update existing gists with `-u`:
 
-    gist -u GIST_ID FILE_NAME
-    gist -u 42f2c239d2eb57299408 test.txt
+    gist-paste -u GIST_ID FILE_NAME
+    gist-paste -u 42f2c239d2eb57299408 test.txt
 
 ‌If you'd like to copy the resulting URL to your clipboard, use `-c`.
 
-    gist -c <a.rb
+    gist-paste -c <a.rb
 
 ‌If you'd like to copy the resulting embeddable URL to your clipboard, use `-e`.
 
-    gist -e <a.rb
+    gist-paste -e <a.rb
 
-‌And you can just ask gist to open a browser window directly with `-o`.
+‌And you can just ask gist-paste to open a browser window directly with `-o`.
 
-    gist -o <a.rb
+    gist-paste -o <a.rb
 
 ‌To list (public gists or all gists for authed user) gists for user
 
-    gist -l : all gists for authed user
-    gist -l defunkt : list defunkt's public gists
+    gist-paste -l : all gists for authed user
+    gist-paste -l defunkt : list defunkt's public gists
 
 To read a gist and print it to STDOUT
 
-    gist -r GIST_ID
-    gist -r 374130
+    gist-paste -r GIST_ID
+    gist-paste -r 374130
 
-‌See `gist --help` for more detail.
+‌See `gist-paste --help` for more detail.
 
 ## Login
 
-Before you use `gist` for the first time you will need to log in. There are two supported login flows:
+Before you use `gist-paste` for the first time you will need to log in. There are two supported login flows:
 
 1. The Github device-code Oauth flow. This is the default for authenticating to github.com, and can be enabled for Github Enterprise by creating an Oauth app, and exporting the environment variable `GIST_CLIENT_ID` with the client id of the Oauth app.
 2. The (deprecated) username and password token exchange flow. This is the default for GitHub Enterprise, and can be used to log into github.com by exporting the environment variable `GIST_USE_USERNAME_AND_PASSWORD`.
@@ -93,7 +93,7 @@ Before you use `gist` for the first time you will need to log in. There are two
 
 This flow allows you to obtain a token by logging into GitHub in the browser and typing a verification code. This is the preferred mechanism.
 
-    gist --login
+    gist-paste --login
     Requesting login parameters...
     Please sign in at https://github.com/login/device
       and enter code: XXXX-XXXX
@@ -105,7 +105,7 @@ The returned access_token is stored in `~/.gist` and used for all future gisting
 
 This flow asks for your GitHub username and password (and 2FA code), and exchanges them for a token with the "gist" permission (your username and password are not stored). This mechanism is deprecated by GitHub, but may still work with GitHub Enterprise.
 
-    gist --login
+    gist-paste --login
     Obtaining OAuth2 access_token from GitHub.
     GitHub username: ConradIrwin
     GitHub password:
@@ -119,7 +119,7 @@ file.
 #### Password-less login
 
 If you have a complicated authorization requirement you can manually create a
-token file by pasting a GitHub token with `gist` scope (and maybe the `user:email`
+token file by pasting a GitHub token with `gist-paste` scope (and maybe the `user:email`
 for GitHub Enterprise) into a file called `~/.gist`. You can create one from
 https://github.com/settings/tokens
 
@@ -134,19 +134,19 @@ The `umask` ensures that the file is only accessible from your user account.
 
 ### GitHub Enterprise
 
-If you'd like `gist` to use your locally installed [GitHub Enterprise](https://enterprise.github.com/),
+If you'd like `gist-paste` to use your locally installed [GitHub Enterprise](https://enterprise.github.com/),
 you need to export the `GITHUB_URL` environment variable (usually done in your `~/.bashrc`).
 
     export GITHUB_URL=http://github.internal.example.com/
 
-Once you've done this and restarted your terminal (or run `source ~/.bashrc`), gist will
+Once you've done this and restarted your terminal (or run `source ~/.bashrc`), gist-paste will
 automatically use GitHub Enterprise instead of the public github.com
 
 Your token for GitHub Enterprise will be stored in `.gist.<protocol>.<server.name>[.<port>]` (e.g.
 `~/.gist.http.github.internal.example.com` for the GITHUB_URL example above) instead of `~/.gist`.
 
 If you have multiple servers or use Enterprise and public GitHub often, you can work around this by creating scripts
-that set the env var and then run `gist`. Keep in mind that to use the public GitHub you must unset the env var. Just
+that set the env var and then run `gist-paste`. Keep in mind that to use the public GitHub you must unset the env var. Just
 setting it to the public URL will not work. Use `unset GITHUB_URL`
 
 ### Token file format
@@ -154,7 +154,7 @@ setting it to the public URL will not work. Use `unset GITHUB_URL`
 If you cannot use passwords, as most Enterprise installations do, you can generate the token via the web interface
 and then simply save the string in the correct file. Avoid line breaks or you might see:
 ```
-$ gist -l
+$ gist-paste -l
 Error: Bad credentials
 ```
 
@@ -180,7 +180,7 @@ NOTE: The access_token must have the `gist` scope and may also require the `user
 
     Gist.multi_gist("a.rb" => "Foo.bar", "a.py" => "Foo.bar")
 
-‌If you'd rather use gist's builtin access_token, then you can force the user
+‌If you'd rather use gist-paste's builtin access_token, then you can force the user
   to obtain one by calling:
 
     Gist.login!
@@ -190,12 +190,12 @@ in `~/.gist`, where it can later be read by `Gist.gist`
 
 ## Configuration
 
-‌If you'd like `-o` or `-c` to be the default when you use the gist executable, add an
+‌If you'd like `-o` or `-c` to be the default when you use the gist-paste executable, add an
 alias to your `~/.bashrc` (or equivalent). For example:
 
-    alias gist='gist -c'
+    alias gist-paste='gist-paste -c'
 
-‌If you'd prefer gist to open a different browser, then you can export the BROWSER
+‌If you'd prefer gist-paste to open a different browser, then you can export the BROWSER
 environment variable:
 
     export BROWSER=google-chrome
@@ -204,7 +204,7 @@ If clipboard or browser integration don't work on your platform, please file a b
 (more ideally) a pull request.
 
 If you need to use an HTTP proxy to access the internet, export the `HTTP_PROXY` or
-`http_proxy` environment variable and gist will use it.
+`http_proxy` environment variable and gist-paste will use it.
 
 ## Meta-fu
 
diff --git a/Rakefile b/Rakefile
index 006f559..5f9b911 100644
--- a/Rakefile
+++ b/Rakefile
@@ -14,7 +14,7 @@ task :man do
   File.write "README.md.ron", File.read("README.md").gsub("\u200c", "* ")
   sh 'ronn --roff --manual="Gist manual" README.md.ron'
   rm 'README.md.ron'
-  mv 'README.1', 'build/gist.1'
+  mv 'README.1', 'build/gist-paste.1'
 end
 
 task :standalone do
diff --git a/build/gist.1 b/build/gist.1
index 850c556..6e52791 100644
--- a/build/gist.1
+++ b/build/gist.1
@@ -4,10 +4,10 @@
 .TH "GIST" "1" "August 2020" "" "Gist manual"
 .
 .SH "NAME"
-\fBgist\fR \- upload code to https://gist\.github\.com
+\fBgist-paste\fR \- upload code to https://gist\.github\.com
 .
 .SH "Synopsis"
-The gist gem provides a \fBgist\fR command that you can use from your terminal to upload content to https://gist\.github\.com/\.
+The gist gem provides a \fBgist-paste\fR command that you can use from your terminal to upload content to https://gist\.github\.com/\.
 .
 .SH "Installation"
 .
@@ -43,67 +43,69 @@ pkg install gist
 To upload the contents of \fBa\.rb\fR just:
 .
 .IP
-gist a\.rb
+gist-paste a\.rb
 .
 .IP "\(bu" 4
 Upload multiple files:
 .
 .IP
-gist a b c gist *\.rb
+gist-paste a b c gist *\.rb
 .
 .IP "\(bu" 4
 By default it reads from STDIN, and you can set a filename with \fB\-f\fR\.
 .
 .IP
-gist \-f test\.rb <a\.rb
+gist-paste \-f test\.rb <a\.rb
 .
 .IP "\(bu" 4
 Alternatively, you can just paste from the clipboard:
 .
 .IP
-gist \-P
+gist-paste \-P
 .
 .IP "\(bu" 4
 Use \fB\-p\fR to make the gist private:
 .
 .IP
-gist \-p a\.rb
+gist-paste \-p a\.rb
 .
 .IP "\(bu" 4
 Use \fB\-d\fR to add a description:
 .
 .IP
-gist \-d "Random rbx bug" a\.rb
+gist-paste \-d "Random rbx bug" a\.rb
 .
 .IP "\(bu" 4
 You can update existing gists with \fB\-u\fR:
 .
 .IP
-gist \-u GIST_ID FILE_NAME gist \-u 42f2c239d2eb57299408 test\.txt
+gist-paste \-u GIST_ID FILE_NAME gist \-u 42f2c239d2eb57299408 test\.txt
 .
 .IP "\(bu" 4
 If you\'d like to copy the resulting URL to your clipboard, use \fB\-c\fR\.
 .
 .IP
-gist \-c <a\.rb
+gist-paste \-c <a\.rb
 .
 .IP "\(bu" 4
 If you\'d like to copy the resulting embeddable URL to your clipboard, use \fB\-e\fR\.
 .
 .IP
-gist \-e <a\.rb
+gist-paste \-e <a\.rb
 .
 .IP "\(bu" 4
-And you can just ask gist to open a browser window directly with \fB\-o\fR\.
+And you can just ask \fBgist-paste\fR to open a browser window directly with \fB\-o\fR\.
 .
 .IP
-gist \-o <a\.rb
+gist-paste \-o <a\.rb
 .
 .IP "\(bu" 4
 To list (public gists or all gists for authed user) gists for user
 .
 .IP
-gist \-l : all gists for authed user gist \-l defunkt : list defunkt\'s public gists
+gist-paste \-l : all gists for authed user 
+.IP
+gist-paste \-l defunkt : list defunkt\'s public gists
 .
 .IP "" 0
 .
@@ -114,20 +116,20 @@ To read a gist and print it to STDOUT
 .
 .nf
 
-gist \-r GIST_ID
-gist \-r 374130
+gist-paste \-r GIST_ID
+gist-paste \-r 374130
 .
 .fi
 .
 .IP "" 0
 .
 .IP "\(bu" 4
-See \fBgist \-\-help\fR for more detail\.
+See \fBgist-paste \-\-help\fR for more detail\.
 .
 .IP "" 0
 .
 .SH "Login"
-Before you use \fBgist\fR for the first time you will need to log in\. There are two supported login flows:
+Before you use \fBgist-paste\fR for the first time you will need to log in\. There are two supported login flows:
 .
 .IP "1." 4
 The Github device\-code Oauth flow\. This is the default for authenticating to github\.com, and can be enabled for Github Enterprise by creating an Oauth app, and exporting the environment variable \fBGIST_CLIENT_ID\fR with the client id of the Oauth app\.
@@ -144,7 +146,7 @@ This flow allows you to obtain a token by logging into GitHub in the browser and
 .
 .nf
 
-gist \-\-login
+gist-paste \-\-login
 Requesting login parameters\.\.\.
 Please sign in at https://github\.com/login/device
   and enter code: XXXX\-XXXX
@@ -164,7 +166,7 @@ This flow asks for your GitHub username and password (and 2FA code), and exchang
 .
 .nf
 
-gist \-\-login
+gist-paste \-\-login
 Obtaining OAuth2 access_token from GitHub\.
 GitHub username: ConradIrwin
 GitHub password:
@@ -201,7 +203,7 @@ For example, one way to create this file would be to run:
 The \fBumask\fR ensures that the file is only accessible from your user account\.
 .
 .SS "GitHub Enterprise"
-If you\'d like \fBgist\fR to use your locally installed GitHub Enterprise \fIhttps://enterprise\.github\.com/\fR, you need to export the \fBGITHUB_URL\fR environment variable (usually done in your \fB~/\.bashrc\fR)\.
+If you\'d like \fBgist-paste\fR to use your locally installed GitHub Enterprise \fIhttps://enterprise\.github\.com/\fR, you need to export the \fBGITHUB_URL\fR environment variable (usually done in your \fB~/\.bashrc\fR)\.
 .
 .IP "" 4
 .
@@ -214,16 +216,16 @@ export GITHUB_URL=http://github\.internal\.example\.com/
 .IP "" 0
 .
 .P
-Once you\'ve done this and restarted your terminal (or run \fBsource ~/\.bashrc\fR), gist will automatically use GitHub Enterprise instead of the public github\.com
+Once you\'ve done this and restarted your terminal (or run \fBsource ~/\.bashrc\fR), gist-paste will automatically use GitHub Enterprise instead of the public github\.com
 .
 .P
 Your token for GitHub Enterprise will be stored in \fB\.gist\.<protocol>\.<server\.name>[\.<port>]\fR (e\.g\. \fB~/\.gist\.http\.github\.internal\.example\.com\fR for the GITHUB_URL example above) instead of \fB~/\.gist\fR\.
 .
 .P
-If you have multiple servers or use Enterprise and public GitHub often, you can work around this by creating scripts that set the env var and then run \fBgist\fR\. Keep in mind that to use the public GitHub you must unset the env var\. Just setting it to the public URL will not work\. Use \fBunset GITHUB_URL\fR
+If you have multiple servers or use Enterprise and public GitHub often, you can work around this by creating scripts that set the env var and then run \fBgist-paste\fR\. Keep in mind that to use the public GitHub you must unset the env var\. Just setting it to the public URL will not work\. Use \fBunset GITHUB_URL\fR
 .
 .SS "Token file format"
-If you cannot use passwords, as most Enterprise installations do, you can generate the token via the web interface and then simply save the string in the correct file\. Avoid line breaks or you might see: \fB$ gist \-l Error: Bad credentials\fR
+If you cannot use passwords, as most Enterprise installations do, you can generate the token via the web interface and then simply save the string in the correct file\. Avoid line breaks or you might see: \fB$ gist-paste \-l Error: Bad credentials\fR
 .
 .TP
 You can also use Gist as a library from inside your ruby code:
@@ -267,7 +269,7 @@ If you want to upload multiple files in the same gist, you can:
 Gist\.multi_gist("a\.rb" => "Foo\.bar", "a\.py" => "Foo\.bar")
 .
 .IP "\(bu" 4
-If you\'d rather use gist\'s builtin access_token, then you can force the user to obtain one by calling:
+If you\'d rather use gist-paste\'s builtin access_token, then you can force the user to obtain one by calling:
 .
 .IP
 Gist\.login!
@@ -280,13 +282,13 @@ This will take them through the process of obtaining an OAuth2 token, and storin
 .SH "Configuration"
 .
 .IP "\(bu" 4
-If you\'d like \fB\-o\fR or \fB\-c\fR to be the default when you use the gist executable, add an alias to your \fB~/\.bashrc\fR (or equivalent)\. For example:
+If you\'d like \fB\-o\fR or \fB\-c\fR to be the default when you use the gist-paste executable, add an alias to your \fB~/\.bashrc\fR (or equivalent)\. For example:
 .
 .IP
 alias gist=\'gist \-c\'
 .
 .IP "\(bu" 4
-If you\'d prefer gist to open a different browser, then you can export the BROWSER environment variable:
+If you\'d prefer gist-paste to open a different browser, then you can export the BROWSER environment variable:
 .
 .IP
 export BROWSER=google\-chrome
@@ -297,7 +299,7 @@ export BROWSER=google\-chrome
 If clipboard or browser integration don\'t work on your platform, please file a bug or (more ideally) a pull request\.
 .
 .P
-If you need to use an HTTP proxy to access the internet, export the \fBHTTP_PROXY\fR or \fBhttp_proxy\fR environment variable and gist will use it\.
+If you need to use an HTTP proxy to access the internet, export the \fBHTTP_PROXY\fR or \fBhttp_proxy\fR environment variable and gist-paste will use it\.
 .
 .SH "Meta\-fu"
 Thanks to @defunkt and @indirect for writing and maintaining versions 1 through 3\. Thanks to @rking and @ConradIrwin for maintaining version 4\.
diff --git a/gist.gemspec b/gist.gemspec
index 4d7a2f3..7708a38 100644
--- a/gist.gemspec
+++ b/gist.gemspec
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
   s.files         = `git ls-files`.split("\n") - Dir.glob("build/*") - [".gitignore"]
   s.require_paths = ["lib"]
 
-  s.executables << 'gist'
+  s.executables << 'gist-paste'
 
   s.add_development_dependency 'rake'
   s.add_development_dependency 'ronn'
