allowedSearchTerm :: (MonadReader env m, Has Dir.Layout env) => m (Text -> Bool)
allowedSearchTerm =
    recordOpener <&>
    \r searchTerm ->
    any (searchTerm &)
    [ Text.all (`elem` Chars.operator)
    , isNameOrPrefixed
    , (`elem` ["\\", Text.singleton r])
    , isCharSearchTerm
    ]
allowedSearchTerm :: (MonadReader env m, Has Dir.Layout env) => m (Text -> Bool)
allowedSearchTerm =
    recordOpener <&>
    \r searchTerm ->
    any (searchTerm &)
    [ Text.all (`elem` Chars.operator)
    , isNameOrPrefixed
    , (`elem` ["\\", Text.singleton r])
    , isCharSearchTerm
    ]
allowedSearchTerm =
    recordOpener <&>
    \r searchTerm ->
    any (searchTerm &)
    [ Text.all (`elem` Chars.operator)
    , isNameOrPrefixed
    , (`elem` ["\\", Text.singleton r])
    , isCharSearchTerm
    ]