Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix interactive package search #2424

Merged
merged 1 commit into from
Jun 18, 2017
Merged

Fix interactive package search #2424

merged 1 commit into from
Jun 18, 2017

Conversation

agross
Copy link
Contributor

@agross agross commented Jun 15, 2017

Interactive package search currently searches for :q even though the user wants to exit the search:

$ mono bin/paket.exe find-packages
Paket version 5.0.0-rc008
 - Please enter search text (:q for exit):
fake
FAKE
FakeSign
Faker
FakeO
FakeHost
FakeData
FAKEX
FAKE.SQL
FAKE.IIS
FAKE.Lib
Fake.AWS
FakeN.Web
FSharp.FakeTargets
FakeHttp
FakeDb
FakeDbSet
FAKE.Core
FAKE.Gallio
Faker.Net
Sitecore.FakeDb
 - Please enter search text (:q for exit):
:q
Quartz
jQuery
jQuery.Validation
jQuery.UI.Combined
Microsoft.jQuery.Unobtrusive.Ajax
Microsoft.jQuery.Unobtrusive.Validation
AspNet.ScriptManager.jQuery
Q
QR
Qiwi
QB
QLIB
QB1
QLog
qunit
QKit
Qlue
QLSLib
Qi.Data
Qvc
Performance:
 - Average Request Time: 419 milliseconds
 - Number of Requests: 3
 - Runtime: 4 seconds

Copy link
Member

@matthid matthid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it works. Personally I'd prefer refactoring the code in a different way. Maybe tail recursive function?

while c () do
q ()
if c () then
a ()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oo

@agross
Copy link
Contributor Author

agross commented Jun 16, 2017

I have no idea whether this is tail recursive, but you were right, the code looks better.

Copy link
Member

@matthid matthid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@forki
Copy link
Member

forki commented Jun 18, 2017

thx

@forki forki merged commit bb4fcf3 into fsprojects:master Jun 18, 2017
@agross agross deleted the fix-interactive-search branch July 5, 2017 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants