Skip to content

Commit 596533a

Browse files
committed
gem: complete unpack
1 parent 74494a5 commit 596533a

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

completion-gem

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ __gem() {
6464
return;;
6565
uninstall | cleanup)
6666
choices=$(__gem_installed_gems);;
67-
push)
67+
push | unpack)
6868
type -t _filedir >/dev/null && _filedir gem
6969
return;;
7070
esac

tests/completion-gem/test.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,15 @@ begin-test 'should offer command-specific options'
7070
reject --strict
7171
)
7272
end-test
73+
74+
begin-test 'after unpack should suggest local .gem files'
75+
(
76+
touch foo.rb foo.gem foo.gemspec
77+
78+
test-completion gem unpack f
79+
expect foo.gem
80+
reject foo.rb foo.gemspec
81+
82+
rm -f foo.rb foo.gem foo.gemspec
83+
)
84+
end-test

0 commit comments

Comments
 (0)