tab-completion: minor change to validation
This commit is contained in:
@@ -4,7 +4,7 @@ module Feature
|
|||||||
|
|
||||||
class Tab < Feature::Base
|
class Tab < Feature::Base
|
||||||
def valid?
|
def valid?
|
||||||
argv.size > 0
|
[1,2].include? argv.size
|
||||||
end
|
end
|
||||||
|
|
||||||
def help
|
def help
|
||||||
@@ -17,7 +17,7 @@ module Feature
|
|||||||
def execute
|
def execute
|
||||||
if argv.size == 1
|
if argv.size == 1
|
||||||
pattern = '.+'
|
pattern = '.+'
|
||||||
else
|
elsif argv.size == 2
|
||||||
pattern = "^#{argv[1]}"
|
pattern = "^#{argv[1]}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user