add searchPathContents

And rename related functions for consistency.
This commit is contained in:
Joey Hess 2021-02-02 19:01:45 -04:00
parent aec2cf0abe
commit 1b63132ca3
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
18 changed files with 60 additions and 49 deletions

View file

@ -71,7 +71,7 @@ mkSuCommand :: String -> [CommandParam] -> IO (Maybe SuCommand)
#ifndef mingw32_HOST_OS
mkSuCommand cmd ps = do
pwd <- getCurrentDirectory
firstM (\(SuCommand _ p _) -> inPath p) =<< selectcmds pwd
firstM (\(SuCommand _ p _) -> inSearchPath p) =<< selectcmds pwd
where
selectcmds pwd = ifM (inx <||> (not <$> atconsole))
( return (graphicalcmds pwd ++ consolecmds pwd)