examinekey: Added a "file" format variable

For consistency with find, and for easier scripting.
This commit is contained in:
Joey Hess 2020-11-16 09:56:32 -04:00
parent 21ab496f6b
commit 5a8d01f63e
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
6 changed files with 25 additions and 10 deletions

View file

@ -95,10 +95,8 @@ perform o remotemap key ai = do
mapM_ (showRemoteUrls remotemap) urls
Just formatter -> liftIO $ do
let vs = catMaybes
[ fmap (("file",) . fromRawFilePath)
(actionItemWorkTreeFile ai)
] ++ Command.Find.keyVars key
let vs = Command.Find.formatVars key
(AssociatedFile (actionItemWorkTreeFile ai))
let showformatted muuid murl = putStr $
Utility.Format.format formatter $
M.fromList $ vs ++ catMaybes