params
invalid but no actual errors are raised. I would suggest reading parse method section and params section. I wrote the Readme to document all the APIs and usage but please free to submit PR if something is missing or not clear enough. I'm keen to make sure the docs are complete and easy to use.
help needed: for some reason, I "gem install tty" but don't get "teletype" as a new command.
effrey@Mac-mini youtube % gem install tty
Successfully installed tty-0.10.0
Parsing documentation for tty-0.10.0
Done installing documentation for tty after 0 seconds
1 gem installed
jeffrey@Mac-mini youtube % teletype new app
zsh: command not found: teletype
tty
gem. I verified by installing v0.10.0
that the teletype
executable works as expected. I'd potentially look into reinstalling Ruby version that you're using. However, this is an issue for yourself to figure out why your system fails to find Ruby installed executables.
Hi @piotrmurach, TTY Toolkit is great and thank you for saving a lot of our time. However, I have a small problem. I can't figure out how to send the user input from
prompt.ask(">>") do |q|
q.validate(/(close)|(\A[0-9]+(\.[0-9]+)?[\+\-\*\√][0-9]+(\.[0-9]+)?\z)/, "Invalid question, #{ENV["USER"].capitalize}. Try again.\a")
end
to a global variable. How may I do this?
TTY::Table
, I was wondering what is the status of getting the following merged:# Describe available commands or one specific command.
RSpec.describe "`parc-cli version` command", type: :cli do
it "executes `parc-cli version --check` command successfully" do
VCR.use_cassette("version-check") do
output = `parc-cli version --check`
# assert here
end
end
end
enum_select
and expand
prompts. There is an piotrmurach/tty-prompt#151 and a piotrmurach/tty-prompt#152 where this feature is discussed. I cannot tell you when this will be done.
require 'git'
require "tty-prompt"
repo_name_list = ['repo_name_1', 'repo_name_2']
prompt = TTY::Prompt.new
prompt.multi_select("Which repos would you like to clone locally?", repo_name_list)
# NoMethodError: undefined method `disabled?' for nil:NilClass
prompt.enum_select("Which repos would you like to clone locally?", repo_name_list)
# NoMethodError: undefined method `disabled?' for nil:NilClass
TTY::ProgressBar::Multi
and was wondering if there was an off the shelf way to clear registered/child bars when they complete? I've tried adding clear: true
to both the new instance of TTY::ProgressBar::Multi
and as an option provided to #register
. Neither of these have any impact as the progress bars finish.
Hi folks! I'm trying to find a way to not use the space character as selection when filtering a list using select
. I'm using select
for a list of names that have spaces in them (e.g.team_names = ["Some Team", "Some Team: SubTeam"]
). When the user types "Some " the prompt selects the first instance and I want it to continue filtering using the space.
I'm using prompt.select('Select your team name:', team_names, filter: true)
.
I tried using prompt.select('Select your team name:', team_names, filter: true, keys: [:return])
but that didn't work. Is there another option I should be passing here? I'm using v 0.18.1
Thanks!