Add bin and edit workflow
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s

This commit is contained in:
2026-09-16 13:11:16 -06:00
parent c8ac4fcae5
commit 4cee170d66
17576 changed files with 895740 additions and 2 deletions
@@ -0,0 +1,51 @@
# frozen_string_literal: true
class Pry
class Command
class ChangePrompt < Pry::ClassCommand
match 'change-prompt'
group 'Input and Output'
description 'Change the current prompt.'
command_options argument_required: true
banner <<-BANNER
Usage: change-prompt [OPTIONS] [NAME]
Change the current prompt.
BANNER
def options(opt)
opt.on(:l, :list, 'List the available prompts')
end
def process(prompt)
if opts.present?(:l)
list_prompts
else
change_prompt(prompt)
end
end
private
def list_prompts
prompts = Pry::Prompt.all.map do |name, prompt|
"#{bold(name)}#{red(' (selected)') if pry_instance.prompt == prompt}\n" +
prompt.description
end
output.puts(prompts.join("\n" * 2))
end
def change_prompt(prompt)
if Pry::Prompt[prompt]
pry_instance.prompt = Pry::Prompt[prompt]
else
raise Pry::CommandError,
"'#{prompt}' isn't a known prompt. Run `change-prompt --list` " \
"to see the list of known prompts."
end
end
Pry::Commands.add_command(self)
end
end
end