Skip to content

Commit

Permalink
gem: complete unpack
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Sep 21, 2024
1 parent 74494a5 commit 596533a
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 596533a

Please sign in to comment.