For a directory with an extension in the directory name, e.g. "myDir.ext", the meta and style fields in the node_type are set incorrectly if config options are present for that extension.
Minimum example: create a directory called myDir.ext and use the following config:
version = '0.21.8'
xplr.config.node_types.directory.meta.icon = "D"
xplr.config.node_types.extension.ext = { meta = { icon = "F"}}
xplr.config.node_types.file.meta.icon = "F"
Current output:
I think the current behaviour is not intuitive, since I would assume that the extension node type is meant to apply to regular files rather than directories. I would expect the output to be:
For a directory with an extension in the directory name, e.g. "myDir.ext", the meta and style fields in the
node_type
are set incorrectly if config options are present for that extension. Minimum example: create a directory calledmyDir.ext
and use the following config:Current output:
I think the current behaviour is not intuitive, since I would assume that the extension node type is meant to apply to regular files rather than directories. I would expect the output to be:
The fix would be to check for a directory when extending the node meta and style fields with the config options that are set for extensions. The change would be in the following line: https://github.com/sayanarijit/xplr/blob/ad8afa9d38bef21ba72abcee03759db2725cc932/src/config.rs#L107
which would be changed to: