Results for “require”
Small, practical examples. Search by task or narrow things down below.
Classify a filename with shell patterns
Bash Scripts: Case patterns support alternatives without launching an external regex tool.
Bash Scripts✓ Tested
Clean up a generator after an early break
TypeScript: Breaking a for-of loop closes a generator and runs its finally block.
TypeScript✓ Tested
Clean up a temporary directory automatically
Use an EXIT trap so temporary files are removed when the script ends.
mktemp✓ Tested
Clone a local bare repository
Git: A local remote provides the same clone workflow without any network dependency.
Git✓ Tested
Collect ordered values into an array
Build a sorted array from query rows.
array_agg✓ Tested
Collect two independent background results
Bash Scripts: Write each job’s output separately and wait for both before combining results.
Bash Scripts✓ Tested
Combine a branch’s changes into one new commit
Git: Squash prepares the combined changes in the index without recording a merge parent.
Git✓ Tested
Combine a stable entrypoint with default arguments
Docker / Compose: CMD supplies default arguments to an exec-form ENTRYPOINT.
Docker / Compose✓ Tested
Combine conditions with and
PowerShell: Combine conditions with and using PowerShell 7.
PowerShell✓ Tested
Combine results while retaining duplicates
SQL Server: UNION ALL does not spend work removing equal rows.
SQL Server✓ Tested
Combine results while retaining duplicates
Postgres: UNION ALL does not spend work removing equal rows.
Postgres✓ Tested
Combine results while retaining duplicates
SQLite: UNION ALL does not spend work removing equal rows.
SQLite✓ Tested