Skip to content

Commit

Permalink
Merge pull request #18 from nobu/gem-unpack
Browse files Browse the repository at this point in the history
gem: complete `unpack`
  • Loading branch information
mernen authored Sep 24, 2024
2 parents 74494a5 + 596533a commit 96374ae
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion completion-gem
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ __gem() {
return;;
uninstall | cleanup)
choices=$(__gem_installed_gems);;
push)
push | unpack)
type -t _filedir >/dev/null && _filedir gem
return;;
esac
Expand Down
12 changes: 12 additions & 0 deletions tests/completion-gem/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,15 @@ begin-test 'should offer command-specific options'
reject --strict
)
end-test

begin-test 'after unpack should suggest local .gem files'
(
touch foo.rb foo.gem foo.gemspec

test-completion gem unpack f
expect foo.gem
reject foo.rb foo.gemspec

rm -f foo.rb foo.gem foo.gemspec
)
end-test

0 comments on commit 96374ae

Please sign in to comment.