Repository navigation
Conversation
Contributor
|
I think this is an interesting idea but hasn't caught on. Since it's so old, let's close for now and maybe revisit this discussion on discord in #design-discussion. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR demonstrates a proof-of-concept for the feature request in #10650. Note that this is a crude proof-of-concept, and you will see several TODO notes (which are not comprehensive).
With this proof-of-concept,
lsis redefined to accept a list of strings as input instead of a command-line argument. This means that it must be called differently, and in a final version this would be renamed tofetch-file-metadatainstead oflsto avoid confusion (note: the copy/paste did something funky with the table borders, they are still rendered as smooth lines on my terminal):The default config file has been updated to provide a function named
new-ls, which would be renamed to justlsin a final version:Note that I am sometimes experiencing notable delays when using
new-ls. I assume that this is due to performance differences betweennu_globandwax. However, it is theoretically possible that it has to do with the nu-level function. I would expect that a final version of this PR would also provide a user-facing command which performs globbing as innu_glob, and this would be used in the nu-level function be default.One unresolved issue is that
new-lshas no way to pass flags like--directoryor--short-namesto the underlyinglscommand. It is not clear whether these things are best handled within the Rust-level command, as separate commands in the pipeline, or in a more complicated implementation ofnew-ls(I would prefer to avoid any code beyond a simple pipeline in at least the default implementations of the nu-level functions).User-Facing Changes
A final version of this PR would not create any user-facing changes when invoking
ls. However, it would give users the additional option of invokingfetch-file-metadatadirectly.Tests + Formatting
TODO
After Submitting
TODO