91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
# File 'lib/space_src/cli/shell.rb', line 91
def call(kind:, extra: [], **)
case kind
when "checkouts"
begin
paths = CLI.make_paths
config = Config::Store.load(paths.config_file).success
Nav.scan(config.base_dir).each { |e| out.puts e[:target] }
rescue
end
CLI.record_outcome(Outcome.new(exit_code: 0))
when "shells"
out.puts "fish"
CLI.record_outcome(Outcome.new(exit_code: 0))
else
err.puts "Usage: src shell complete checkouts|shells"
CLI.record_outcome(Outcome.new(exit_code: 1))
end
rescue => e
err.puts "src shell complete: #{e.message}"
CLI.record_outcome(Outcome.new(exit_code: 1))
end
|