Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add wildcard and prefix support to cat #736

Merged
merged 12 commits into from
Jul 16, 2024

Conversation

tarikozyurtt
Copy link
Contributor

@tarikozyurtt tarikozyurtt commented Jul 8, 2024

This pull request enhances the cat command in s5cmd to support wildcard and prefix operations, improving its flexibility and usability for users. It includes comprehensive test cases.

  • Wildcard Support:
    Example: s5cmd cat s3://bucket/foo* concatenates content of files with paths starting with s3://bucket/foo. Use quotation marks according to your terminal type (e.g., bash, zsh).

  • Prefix Support:
    Enables cat to concatenate all files within a specified directory. Ignores nested folders.
    Example: s5cmd cat s3://bucket/dir/ concatenates content of all files within the "dir" directory. But would not match with files inside s3://bucket/dir/another_folder/. Wildcard characters can be used for this case.

Resolves: #716

@tarikozyurtt tarikozyurtt requested a review from a team as a code owner July 8, 2024 13:28
@tarikozyurtt tarikozyurtt requested review from igungor and seruman and removed request for a team July 8, 2024 13:28
e2e/select_test.go Outdated Show resolved Hide resolved
e2e/ls_test.go Outdated Show resolved Hide resolved
e2e/du_test.go Outdated Show resolved Hide resolved
@tarikozyurtt tarikozyurtt requested a review from denizsurmeli July 9, 2024 11:58
command/cat.go Outdated Show resolved Hide resolved
command/cat.go Outdated Show resolved Hide resolved
e2e/cat_test.go Outdated Show resolved Hide resolved
e2e/cat_test.go Outdated Show resolved Hide resolved
e2e/cat_test.go Outdated Show resolved Hide resolved
e2e/cat_test.go Outdated Show resolved Hide resolved
e2e/cat_test.go Outdated Show resolved Hide resolved
e2e/cat_test.go Show resolved Hide resolved
e2e/cat_test.go Outdated Show resolved Hide resolved
@denizsurmeli denizsurmeli removed their request for review July 11, 2024 08:00
e2e/cat_test.go Outdated Show resolved Hide resolved
e2e/cat_test.go Outdated Show resolved Hide resolved
e2e/cat_test.go Outdated Show resolved Hide resolved
Copy link
Member

@seruman seruman left a comment

Choose a reason for hiding this comment

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

🎉

@denizsurmeli denizsurmeli merged commit 89218dc into peak:master Jul 16, 2024
13 checks passed
@tarikozyurtt tarikozyurtt deleted the cat-glob branch July 16, 2024 16:18
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.

Support cat with glob
4 participants