Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is_file option not working for ask #531

Open
elliotcm opened this issue Jun 17, 2024 · 1 comment
Open

is_file option not working for ask #531

elliotcm opened this issue Jun 17, 2024 · 1 comment

Comments

@elliotcm
Copy link

Hello. As far as I can tell, the is_file option for ask is not working, perhaps just on my local environment, but I'm not sure how to debug further.

I've created a minimal test, and confirmed that I can't tab complete either files in CWD or even starting with /

file_test.rb:

require "rubygems"
require "cli/ui"

file = CLI::UI.ask("A file question", is_file: true)
puts "File exists? #{File.exist?(file)}"

Some system/version information (I've [redacted] a few bits):

% gem list cli-ui
*** LOCAL GEMS ***

cli-ui (2.2.3)
% ruby -v
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
% asdf info
OS:
Darwin [machine-name] 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:28:45 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6020 arm64

SHELL:
zsh 5.9 (x86_64-apple-darwin23.0)

BASH VERSION:
3.2.57(1)-release

ASDF VERSION:
v0.14.0

ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=[~]/.asdf
ASDF_DIR=/opt/homebrew/opt/asdf/libexec
ASDF_CONFIG_FILE=[~]/.asdfrc

ASDF INSTALLED PLUGINS:
nodejs                       https://github.com/asdf-vm/asdf-nodejs.git master c5b7c40
ruby                         https://github.com/asdf-vm/asdf-ruby.git master 37e32d1
yarn                         https://github.com/twuni/asdf-yarn.git main 376c540

I don't know which readline asdf uses but this is the one I have installed from homebrew:

% brew info readline
==> readline: stable 8.2.10 (bottled) [keg-only]
Library for command-line editing
https://tiswww.case.edu/php/chet/readline/rltop.html
Installed
/opt/homebrew/Cellar/readline/8.2.10 (51 files, 1.7MB)
  Poured from bottle using the formulae.brew.sh API on 2024-06-13 at 09:09:30
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/r/readline.rb
@donk-shopify
Copy link
Contributor

Reline.completion_proc in ./lib/cli/ui/prompt.rb appears to not function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants