trk 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/trk/cli.rb +19 -0
- data/lib/trk/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c38302d31fd705e553d2596b8c6e878a95f81b4a49d15bb044354a930d1fe2d
|
4
|
+
data.tar.gz: 0aae3f6637ac5838c776c590877ad2a67f4581302525ef510612a969a56cd6f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44390e4ab9e14328dda5c05645bc1c7e2eb74ee6c32a7a6a962edd06fe1f9c1f6f4c2a28dadc312cbdbb4690173c73529bc84cccdd65e3e20e380bb0d671852d
|
7
|
+
data.tar.gz: 0daa1839615e15d522ae3d6c48608d3f5ec24f055ab6c79d89809696c6e6773bbc9fe68891cf9e0f9fe4e583084f3580288aec97edc879cb27fd2ce6f7ed766a
|
data/lib/trk/cli.rb
CHANGED
@@ -5,6 +5,25 @@ require "uri"
|
|
5
5
|
|
6
6
|
module Trk
|
7
7
|
class CLI < Thor
|
8
|
+
def self.start(given_args = ARGV, config = {})
|
9
|
+
if given_args.include?("--version") || given_args.include?("-v")
|
10
|
+
puts "trk version #{VERSION}"
|
11
|
+
exit
|
12
|
+
end
|
13
|
+
super
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.help(shell, subcommand = false)
|
17
|
+
super
|
18
|
+
puts "\n To enable autocomplete, put in .bashrc: 'complete -W \"$(trk completion)\" trk', eg:\n"
|
19
|
+
puts "echo '# https://trk.tools/app/trk-readme-source-links\ncomplete -W \"$(trk completion)\" trk' >> ~/.bashrc && source ~/.bashrc"
|
20
|
+
end
|
21
|
+
|
22
|
+
desc "completion", "Outputs available commands for autocompletion"
|
23
|
+
def completion
|
24
|
+
puts self.class.all_commands.keys.join(" ")
|
25
|
+
end
|
26
|
+
|
8
27
|
desc "add_github_keys USERNAME", "Add Github user public keys to .ssh/authorized_keys"
|
9
28
|
def add_github_keys(username)
|
10
29
|
uri = URI "https://trk.tools/sh/ssh-tips/-/raw/main/add_github_keys_to_authorized_keys.sh"
|
data/lib/trk/version.rb
CHANGED