Module: Readline
- Defined in:
- lib/cli/ui/prompt.rb
Constant Summary collapse
- FILENAME_COMPLETION_PROC =
proc do |input| directory = input[-1] == '/' ? input : File.dirname(input) filename = input[-1] == '/' ? '' : File.basename(input) (Dir.entries(directory).select do |fp| fp.start_with?(filename) end - (input[-1] == '.' ? [] : ['.', '..'])).map do |fp| File.join(directory, fp).gsub(/\A\.\//, '') end end