Skip to content

Fix interactive package search - #2424

Merged
forki merged 1 commit into
fsprojects:masterfrom
agross:fix-interactive-search
Jun 18, 2017
Merged

Fix interactive package search#2424
forki merged 1 commit into
fsprojects:masterfrom
agross:fix-interactive-search

Conversation

@agross

@agross agross commented Jun 15, 2017

Copy link
Copy Markdown
Contributor

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

@matthid matthid left a comment

Copy link
Copy Markdown
Member

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?

Comment thread src/Paket/Program.fs Outdated
while c () do
q ()
if c () then
a ()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oo

@agross

agross commented Jun 16, 2017

Copy link
Copy Markdown
Contributor Author

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

@matthid matthid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice!

@forki

forki commented Jun 18, 2017

Copy link
Copy Markdown
Member

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.

3 participants