You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, chezmoi managed lists all managed files. You can change the output with --path-style to show the absolute/relative target OR source path only for the files. There is no way to visualize both target and source paths together.
I think it would be interesting if there was an option to show both the target AND source paths in a single line for each managed file, as it would provide a quicker way to visualize all files and attributes in one go (ha), plus it would greatly help parsing the results in custom scripts that call chezmoi commands.
Describe the solution you'd like
Since there is already a --tree flag that changes the output formatting, another flag like --full to change the display to show both target and source paths could work, with the paths separated by a ":".
For now, I am running source-path or target-path to get the corresponding entry for each file listed by the managed command or ls on source directory when I want to visualize attributes, however this increases the execution and adds more complexity to handle each file.
Additional context
Thought about this when writing a telescope extension for my nvim-chezmoi plugin. I wanted to list all source managed files but display the target path for each one to the user. Since I need the original source path, I can't just run chezmoi managed --path-style target-absolute. The alternative I am using works fine but makes the file picker lag a bit before displaying so currently I switched this to a file name manual parsing approach, but it would be nice if chezmoi managed itself could handle that.
The text was updated successfully, but these errors were encountered:
I wonder if having something like a --json flag for a use case like this might be better.
Could work too, but I believe it would be more appropriate to implement a --format parameter, e.g. --format json if that is the the case. My suggestion was because from what I understood from source for managed, it seemed easier to just concatate the two paths.
Is your feature request related to a problem? Please describe.
Currently,
chezmoi managed
lists all managed files. You can change the output with--path-style
to show the absolute/relative target OR source path only for the files. There is no way to visualize both target and source paths together.I think it would be interesting if there was an option to show both the target AND source paths in a single line for each managed file, as it would provide a quicker way to visualize all files and attributes in one go (ha), plus it would greatly help parsing the results in custom scripts that call chezmoi commands.
Describe the solution you'd like
Since there is already a
--tree
flag that changes the output formatting, another flag like--full
to change the display to show both target and source paths could work, with the paths separated by a ":".Examples:
Describe alternatives you've considered
For now, I am running
source-path
ortarget-path
to get the corresponding entry for each file listed by themanaged
command orls
on source directory when I want to visualize attributes, however this increases the execution and adds more complexity to handle each file.Additional context
Thought about this when writing a telescope extension for my
nvim-chezmoi
plugin. I wanted to list all source managed files but display the target path for each one to the user. Since I need the original source path, I can't just runchezmoi managed --path-style target-absolute
. The alternative I am using works fine but makes the file picker lag a bit before displaying so currently I switched this to a file name manual parsing approach, but it would be nice ifchezmoi managed
itself could handle that.The text was updated successfully, but these errors were encountered: