Skip to content

feat(output): replace call of 'ls' with own detailled listing#1847

Open
defigli wants to merge 4 commits intosharkdp:masterfrom
defigli:feature/native-list-details
Open

feat(output): replace call of 'ls' with own detailled listing#1847
defigli wants to merge 4 commits intosharkdp:masterfrom
defigli:feature/native-list-details

Conversation

@defigli
Copy link
Copy Markdown

@defigli defigli commented Nov 25, 2025

Closes #1845

The call of ls -lhd is replaced by a native detailled listing.

Sample output:

-rw-rw-r--   1    testuser    testuser     32 K Nov 25 17:42 CHANGELOG.md                                                                                                                    
-rw-rw-r--   1    testuser    testuser    1.6 K Nov 25 17:42 CONTRIBUTING.md                                                                                                                 
-rw-rw-r--   1    testuser    testuser     26 K Nov 25 18:12 Cargo.lock                                                                                                                      
-rw-rw-r--   1    testuser    testuser    2.8 K Nov 25 18:12 Cargo.toml                                                                                                                      
-rw-rw-r--   1    testuser    testuser    218 B Nov 25 17:42 Cross.toml                                                                                                                      
-rw-rw-r--   1    testuser    testuser     11 K Nov 25 17:42 LICENSE-APACHE                                                                                                                  
-rw-rw-r--   1    testuser    testuser    1.1 K Nov 25 17:42 LICENSE-MIT                                                                                                                     
-rw-rw-r--   1    testuser    testuser    1.1 K Nov 25 17:42 Makefile                                                                                                                        
-rw-rw-r--   1    testuser    testuser     27 K Nov 25 17:42 README.md                                                                                                                       
-rw-rw-r--   1    testuser    testuser    1.4 K Nov 25 17:42 SECURITY.md    

Comment thread src/output.rs Outdated
.duration_since(SystemTime::UNIX_EPOCH)
.unwrap_or(std::time::Duration::ZERO);
let timestamp =
Timestamp::new(duration.as_secs() as i64, duration.subsec_nanos() as i32).unwrap();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jiff implements try_from(SystemTime)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@defigli defigli force-pushed the feature/native-list-details branch from 2ceb725 to 9b4e9b4 Compare November 27, 2025 15:43
Copy link
Copy Markdown
Collaborator

@tmccombs tmccombs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Builds are failing. Please make sure this compiles, tests pass, and the feature actually works before making a PR.

I haven't reviewed this thoroughly, but I suspect that it was generated with AI. If that was the case, please indicate it, and review it yourself to ensure it is high quality.

Comment thread src/main.rs
Comment on lines +342 to 344
fn extract_command(opts: &mut Opts) -> Result<Option<CommandSet>> {
opts.exec.command.take().map(Ok).transpose()
ignore_contain: opts.ignore_contain,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what happened here, but this isn't valid syntax, and is probably part of why the builds are failing.

Comment thread Cargo.toml
crossbeam-channel = "0.5.15"
clap_complete = {version = "4.6.0", optional = true}
faccess = "0.2.4"
jiff = "0.2.14"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we already have a dependency on jiff, why are you adding it again?

Comment thread src/output.rs
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any overlap between these changes and #1866? Could we avoid duplicating logic for getting the additional information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement --list-details natively

3 participants