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
Disclaimer: I tried to search to see if this is duplicate, but it didn't come up in any of my searches. I'm sorry if this is duplicated, but I really didn't find anything that is even remotely similar.
Feature request
Many CLI tools support a CLI flag to append certain characters to the end of each entry depending on their type. Perhaps the most common type is adding / to the end of directories to indicate that they are directories. For instance ls and tree both provide -F to append indicator (one of */=>@|) to entries. ls even provides --classify[=WHEN] which can be 'always' (default if omitted), 'auto', or 'never'.
The tree defines is as:
Append a '/' for directories, a '=' for socket files, a '*' for executable files, a '>' for doors (Solaris) and a '|' for FIFO's
In the current fd implementation, one should either do --type d to extract the folders or use --list-details to get the type and then later use cut or something to remove the extra columns. Considering that fd already knows what the item is, it would be super handy to have it append these characters.
If you wonder about my use case, one of the ways I have integrated fd into my workflow is by piping the output to fzf. I can of course ask fd to produce colors an ask fzf to handle ANSI colors, but it would be more ideal to have the characters at the end. As you can see in the following example screenshot, if the colors are not there, it is impossible to differentiate between folders and files:
The text was updated successfully, but these errors were encountered:
@tavianator Thanks for pointing it out. I have clearly missed it by not searching for "slash".
I read most of the discussions in #436 and they are all tailored around having the / after folders (which is what I originally was diving into manpages to get it working), but considering that ls and tree (and most definitely many others) support this convention, I believe it is a good practice to support it as a whole rather than specifically for directories. As mentioned in that thread, it is extremely easy to strip the characters but it is a pain to add them. Additionally, the --classify[=WHEN] in ls can even get extra arguments (e.g directory, pipe or directory+pipe+link) to give the user more freedom and customizability.
Disclaimer: I tried to search to see if this is duplicate, but it didn't come up in any of my searches. I'm sorry if this is duplicated, but I really didn't find anything that is even remotely similar.
Feature request
Many CLI tools support a CLI flag to append certain characters to the end of each entry depending on their type. Perhaps the most common type is adding
/
to the end of directories to indicate that they are directories. For instancels
andtree
both provide-F
to append indicator (one of */=>@|) to entries.ls
even provides--classify[=WHEN]
which can be 'always' (default if omitted), 'auto', or 'never'.The
tree
defines is as:In the current
fd
implementation, one should either do--type d
to extract the folders or use--list-details
to get the type and then later usecut
or something to remove the extra columns. Considering thatfd
already knows what the item is, it would be super handy to have it append these characters.If you wonder about my use case, one of the ways I have integrated
fd
into my workflow is by piping the output tofzf
. I can of course askfd
to produce colors an askfzf
to handle ANSI colors, but it would be more ideal to have the characters at the end. As you can see in the following example screenshot, if the colors are not there, it is impossible to differentiate between folders and files:The text was updated successfully, but these errors were encountered: