improve display of relative path to file

When in a subdirectory, and the file is too, it used to display eg
../subdir/thefile and now will display thefile.
This commit is contained in:
Joey Hess 2023-04-12 15:11:44 -04:00
parent 317887c4d2
commit 275d974120
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -57,7 +57,8 @@ seek o = withKeyOptions (Just (keyOptions o)) False dummyfileseeker
start :: WhereUsedOptions -> (SeekInput, Key, ActionItem) -> CommandStart
start o (_, key, _) = startingCustomOutput key $ do
fs <- filterM stillassociated
fs <- filterM stillassociated
=<< mapM (liftIO . relPathCwdToFile)
=<< mapM (fromRepo . fromTopFilePath)
=<< getAssociatedFiles key
forM_ fs $ display key . QuotedPath