Skip to content

Commit

Permalink
Also complete on Ripl::ShellCommands::BUILTIN.
Browse files Browse the repository at this point in the history
  • Loading branch information
postmodern committed Dec 2, 2012
1 parent 5c395f4 commit 56bdca6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/ripl/completions/shell_commands.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
glob = "#{name}*" glob = "#{name}*"
paths = Set[] paths = Set[]


# search through the BUILTIN command names
Ripl::ShellCommands::BUILTIN.each do |command|
if command.start_with?(name)
paths << "!#{command}"
end
end

# search through $PATH for similar program names # search through $PATH for similar program names
Ripl::ShellCommands::PATHS.each do |dir| Ripl::ShellCommands::PATHS.each do |dir|
Dir.glob(File.join(dir,glob)) do |path| Dir.glob(File.join(dir,glob)) do |path|
Expand Down

0 comments on commit 56bdca6

Please sign in to comment.