bashly 1.4.0.rc2 → 2.0.0.rc1
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/bashly/commands/completions.rb +3 -41
- data/lib/bashly/completions/README.md +3 -7
- data/lib/bashly/completions/bashly-completions.bash +178 -382
- data/lib/bashly/completions/completely.yaml +2 -4
- data/lib/bashly/config_validator.rb +55 -5
- data/lib/bashly/docs/arg.yml +12 -6
- data/lib/bashly/docs/command.yml +0 -12
- data/lib/bashly/docs/flag.yml +29 -5
- data/lib/bashly/libraries/libraries.yml +0 -15
- data/lib/bashly/libraries/settings/settings.yml +9 -1
- data/lib/bashly/script/argument.rb +12 -0
- data/lib/bashly/script/command.rb +1 -2
- data/lib/bashly/script/flag.rb +48 -11
- data/lib/bashly/script/introspection/commands.rb +5 -0
- data/lib/bashly/script/wrapper.rb +1 -1
- data/lib/bashly/settings.rb +28 -3
- data/lib/bashly/version.rb +1 -1
- data/lib/bashly/views/argument/completion.gtx +31 -0
- data/lib/bashly/views/argument/completion_filter.gtx +1 -0
- data/lib/bashly/views/command/completion_argument_candidates.gtx +11 -0
- data/lib/bashly/views/command/completion_argument_filter.gtx +25 -0
- data/lib/bashly/views/command/completion_command_candidates.gtx +3 -0
- data/lib/bashly/views/command/completion_flag_candidates.gtx +21 -0
- data/lib/bashly/views/command/completion_function.gtx +24 -0
- data/lib/bashly/views/command/completion_script.gtx +21 -0
- data/lib/bashly/views/command/completion_script_bash.gtx +63 -0
- data/lib/bashly/views/command/completion_script_zsh.gtx +52 -0
- data/lib/bashly/views/command/completion_word_filter.gtx +44 -0
- data/lib/bashly/views/command/completions.gtx +81 -0
- data/lib/bashly/views/command/inspect_args.gtx +3 -3
- data/lib/bashly/views/command/master_script.gtx +1 -0
- data/lib/bashly/views/command/start.gtx +9 -0
- data/lib/bashly/views/flag/argfile_case.gtx +8 -1
- data/lib/bashly/views/flag/case.gtx +9 -1
- data/lib/bashly/views/flag/completion.gtx +1 -0
- data/lib/bashly/views/flag/completion_filter.gtx +7 -0
- data/lib/bashly/views/flag/completion_filter_arg.gtx +10 -0
- data/lib/bashly/views/flag/completion_filter_block.gtx +8 -0
- data/lib/bashly/views/flag/completion_filter_no_arg.gtx +2 -0
- data/lib/bashly/views/flag/completion_value_candidates.gtx +31 -0
- data/lib/bashly.rb +2 -5
- metadata +22 -37
- data/lib/bashly/completion_builder.rb +0 -231
- data/lib/bashly/concerns/completions.rb +0 -48
- data/lib/bashly/libraries/completions/completions_function.rb +0 -37
- data/lib/bashly/libraries/completions/completions_script.rb +0 -28
- data/lib/bashly/libraries/completions/completions_yaml.rb +0 -26
- /data/lib/bashly/views/wrapper/{bash3_bouncer.gtx → bash_version_bouncer.gtx} +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6e96439b1894f3097d9c8ea8d49b42254075a41bf02b233aa7d57674030e2d7f
|
|
4
|
+
data.tar.gz: 14963288238d456e105ce739fdc076d0bb950f497a234851725ba3f887a4a982
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 474e72b43adcba1b0860f123be0584dbf8d7d7d14797f44018603f6f805e6a792b92282201d7930383e40ff48d771094e339e0c279c12940558a17d07dc09f06
|
|
7
|
+
data.tar.gz: 343351f0dbcb3d182ef2050e99a22f2ff39a1839ba11b208712c3cb85178f44678628f05ac1d2b2a4370e2dc77055f66972d16e94f5a4122dff409b937d9e956
|
|
@@ -1,55 +1,17 @@
|
|
|
1
|
-
require 'completely'
|
|
2
|
-
|
|
3
1
|
module Bashly
|
|
4
2
|
module Commands
|
|
5
3
|
class Completions < Base
|
|
6
|
-
summary '
|
|
7
|
-
help 'Display the bash completions script or install it directly to your bash completions directory'
|
|
4
|
+
summary 'Display bash completions for bashly itself'
|
|
8
5
|
|
|
9
|
-
usage 'bashly completions
|
|
6
|
+
usage 'bashly completions'
|
|
10
7
|
usage 'bashly completions (-h|--help)'
|
|
11
8
|
|
|
12
|
-
option '-i --install', 'Install the completions script to your bash completions directory'
|
|
13
|
-
option '-u --uninstall', 'Uninstall the completions script from your bash completions directory'
|
|
14
|
-
|
|
15
9
|
def run
|
|
16
|
-
|
|
17
|
-
install_completions
|
|
18
|
-
elsif args['--uninstall']
|
|
19
|
-
uninstall_completions
|
|
20
|
-
else
|
|
21
|
-
puts script
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
def installer
|
|
26
|
-
@installer ||= Completely::Installer.new program: 'bashly', script_path: script_path
|
|
10
|
+
puts script
|
|
27
11
|
end
|
|
28
12
|
|
|
29
13
|
private
|
|
30
14
|
|
|
31
|
-
def install_completions
|
|
32
|
-
success = installer.install force: true
|
|
33
|
-
raise Error, "Failed running command:\nnb`#{installer.install_command_string}`" unless success
|
|
34
|
-
|
|
35
|
-
say 'Completions installed'
|
|
36
|
-
say "Source: m`#{installer.script_path}`"
|
|
37
|
-
say "Target: m`#{installer.target_path}`"
|
|
38
|
-
say 'Restart your session for the changes to take effect'
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
def uninstall_completions
|
|
42
|
-
success = installer.uninstall
|
|
43
|
-
raise Error, "Failed running command:\nnb`#{installer.uninstall_command_string}`" unless success
|
|
44
|
-
|
|
45
|
-
say 'Completions uninstalled'
|
|
46
|
-
say 'Restart your session for the changes to take effect'
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
def script_path
|
|
50
|
-
@script_path ||= asset('completions/bashly-completions.bash')
|
|
51
|
-
end
|
|
52
|
-
|
|
53
15
|
def script
|
|
54
16
|
@script ||= asset_content('completions/bashly-completions.bash')
|
|
55
17
|
end
|
|
@@ -15,10 +15,6 @@ Note that for production use, only the `bashly-completions.bash` is used.
|
|
|
15
15
|
|
|
16
16
|
## For users
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
the completions script to your completions directory.
|
|
22
|
-
2. If the above fails, run `bashly completions > out.bash`, then copy the file
|
|
23
|
-
manually to your completions directory (or simply get the
|
|
24
|
-
`bashly-completions.bash` from this directory).
|
|
18
|
+
Run `bashly completions > out.bash`, then copy the file manually to your
|
|
19
|
+
completions directory (or simply get the `bashly-completions.bash` from this
|
|
20
|
+
directory).
|