Results for “only”
Small, practical examples. Search by task or narrow things down below.
List newly added staged files only
Git: Filter the cached diff by added status while leaving modified files out.
Git✓ Tested
List only containers belonging to a label
Docker / Compose: A label filter selects explicitly tagged resources.
Docker / Compose✓ Tested
List only staged filenames
Git: The cached diff compares the index with HEAD rather than comparing working files with the index.
Git✓ Tested
List only volumes matching a label
Docker / Compose: A label filter avoids relying on broad name patterns.
Docker / Compose✓ Tested
Make a Compose service’s filesystem read-only
Docker / Compose: Make a Compose service’s filesystem read-only in a small Compose file.
Docker / Compose✓ Tested
Merge a branch only by fast-forward
Refuse to create an unexpected merge commit.
merge✓ Tested
Mount a host directory read-only
Expose existing files without allowing the container to change them.
bind mount✓ Tested
Mount expensive content only when requested
Mount expensive content only when requested with a small React component and explicit browser behavior.
React✓ Tested
Parse only valid integers
Parse only valid integers in a complete Rust program using the standard library.
Rust✓ Tested
Print only duplicate values
Linux Commands: Use uniq -d after sorting to report each repeated value once.
Linux Commands✓ Tested
Print only the matching portions
Linux Commands: Use extended regex and -o to extract digit sequences.
Linux Commands✓ Tested
Provide read-only application configuration
Provide read-only application configuration with a small React component and explicit browser behavior.
React✓ Tested