I recently modified the fish_key_reader source to support the -d and -D flags (and associated long names) to be compatible with fish. I just noticed that fish_indent uses -d for a different purpose. Neither does it support -D. That's extremely confusing. This issue tracks adding support to fish_indent for the same behavior that fish assigns to those flags. Move its current -d behavior to a different short flag.
The text was updated successfully, but these errors were encountered:
-d flag for fish_indent seems to be used for debugging purpose only. However output format is a bit arcane and it seems this option is not meant for end users. We should probably enable this option for development builds only and improve the output format to be more readable.
The fish_indent -d flag isn't for debugging as much as providing insight into the state of the fish parser. I implemented it when I was working on changes such as commit 4ff8e6e and 59f0261. Anyone working on enhancements to the program is welcome to improve how that information is presented but it will, due to its very nature, never be easy to read or understand. I don't think there is much point in complicating the implementation by making it only accessible in a development build. However, as @faho suggested, I'm going to not assign it a new short flag. Since it is only for developers and it will be used very rarely having the feature be accessible only via a long flag is acceptable.
When would one use this instead of the __fish_parse builtin? (it sure is prettier and doing roughly the same thing... maybe the goals are different.)
I looked at the __fish_parse builtin and for whatever reason it didn't give me the insight I needed to implement the enhancements to fish_indent I was working on. It might be, and probably is, a good idea to merge the two implementations. But that's outside the scope of this issue and is thus issue for another day.