filter out control characters in all other Messages
This does, as a side effect, make long notes in json output not be indented. The indentation is only needed to offset them underneath the display of the file they apply to, so that's ok. Sponsored-by: Brock Spratlen on Patreon
This commit is contained in:
parent
a0e6fa18eb
commit
8b6c7bdbcc
54 changed files with 183 additions and 164 deletions
|
@ -87,12 +87,14 @@ perform o remotemap key ai = do
|
|||
case formatOption o of
|
||||
Nothing -> do
|
||||
let num = length safelocations
|
||||
showNote $ show num ++ " " ++ copiesplural num
|
||||
showNote $ UnquotedString $ show num ++ " " ++ copiesplural num
|
||||
pp <- ppwhereis "whereis" safelocations urls
|
||||
unless (null safelocations) $ showLongNote pp
|
||||
unless (null safelocations) $
|
||||
showLongNote (UnquotedString pp)
|
||||
pp' <- ppwhereis "untrusted" untrustedlocations urls
|
||||
unless (null untrustedlocations) $ showLongNote $ untrustedheader ++ pp'
|
||||
|
||||
unless (null untrustedlocations) $
|
||||
showLongNote $ UnquotedString $
|
||||
untrustedheader ++ pp'
|
||||
mapM_ (showRemoteUrls remotemap) urls
|
||||
Just formatter -> liftIO $ do
|
||||
let vs = Command.Find.formatVars key
|
||||
|
@ -160,6 +162,6 @@ showRemoteUrls :: M.Map UUID Remote -> (UUID, [URLString]) -> Annex ()
|
|||
showRemoteUrls remotemap (uu, us)
|
||||
| null us = noop
|
||||
| otherwise = case M.lookup uu remotemap of
|
||||
Just r -> showLongNote $
|
||||
Just r -> showLongNote $ UnquotedString $
|
||||
unlines $ map (\u -> name r ++ ": " ++ u) us
|
||||
Nothing -> noop
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue