Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Unison.CommandLine.FuzzySelect
Description
Command-line fuzzy selection of arbitrary values. Shells out to fzf for the actual selection.
Synopsis
- fuzzySelect :: forall a. Options -> FuzzySelections a -> IO (Maybe [a])
- isFZFInstalled :: Bool
- fzfPathEnvVar :: String
- data Options = Options {}
- data FuzzySelections a where
- SelectFromChoices :: (a -> Text) -> [a] -> FuzzySelections a
- SelectFiles :: FuzzySelections Text
- defaultOptions :: Options
Documentation
fuzzySelect :: forall a. Options -> FuzzySelections a -> IO (Maybe [a]) Source #
Allows prompting the user to interactively fuzzy-select a result from a list of options, currently shells out to fzf
under the hood.
If fzf is missing, or an error (other than ctrl-c) occurred, returns Nothing.
fzfPathEnvVar :: String Source #
An environment variable that can be set to override the default fzf executable.
data FuzzySelections a where Source #
Constructors
SelectFromChoices :: (a -> Text) -> [a] -> FuzzySelections a | |
SelectFiles :: FuzzySelections Text |
defaultOptions :: Options Source #
Default Options