New project, limit passwords
This commit is contained in:
parent
8cdfff9901
commit
1b3f67199e
2 changed files with 2 additions and 1 deletions
|
@ -40,7 +40,7 @@ mkPassPrompt label f conf = do
|
|||
-- I'm just sorting here, but could use some kind of fuzzy matching instead, but it requires a bit more effort
|
||||
passwords <- sort <$> liftIO getPasswords
|
||||
-- Other change, use infixof instead of prefixof
|
||||
mkXPrompt (Pass label) conf (\input -> pure (sortBy (compare `on` levenshtein input) . filter (consumes input) $ passwords)) f
|
||||
mkXPrompt (Pass label) conf (\input -> pure (sortBy (compare `on` levenshtein input) . take 5 . filter (consumes input) $ passwords)) f
|
||||
where
|
||||
consumes [] _ = True -- everything consumed
|
||||
consumes (_:_) [] = False -- all not consumed
|
||||
|
|
|
@ -37,6 +37,7 @@ projects = [ adminProject "wrk-config"
|
|||
, adminProject "cdc-config"
|
||||
, adminProject "overlays-personal"
|
||||
, candyProject "dhall-packages"
|
||||
, candyProject "hfdb"
|
||||
, spinChat "element"
|
||||
, spinChat "wire"
|
||||
, spinChat "signal"
|
||||
|
|
Loading…
Reference in a new issue