Auto fill

2 snippets across 2 stacks - Bash & Linux, HTML & CSS

SHBash & Linux

Tab Completion

SH · Shortcuts & Productivity
Syntax
Tab       # complete
Tab Tab   # show all possibilities
Example
cd /etc/ng<Tab>
# Completes to: cd /etc/nginx/

git che<Tab><Tab>
# Shows: checkout  cherry  cherry-pick

Note Tab completion works for commands, file paths, and (with bash-completion or zsh plugins) for subcommands and flags of many tools including git, docker, kubectl, and ssh hosts. Install bash-completion for enhanced support in Bash.

HCHTML & CSS

Auto-Fill & Auto-Fit

HC · CSS Grid
Syntax
grid-template-columns: repeat(auto-fill, minmax(min, max));
grid-template-columns: repeat(auto-fit, minmax(min, max));
Example
/* Cards that auto-wrap, minimum 280px each */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

Note auto-fill creates as many tracks as fit, leaving empty tracks if there are fewer items. auto-fit collapses empty tracks, letting items stretch to fill the row. For most card grids, auto-fit is what you want.

Frequently asked questions

How does Bash & Linux handle auto fill?
This task is covered in 2 stacks on this page: Bash & Linux, HTML & CSS. The "Tab Completion" snippet in Bash & Linux uses `Tab # complete`.
Which command does the Bash & Linux example use?
The "Tab Completion" snippet uses `Tab # complete`, from the Shortcuts & Productivity section of the Bash & Linux cheat sheet.
Which stacks cover "auto fill" on this page?
Bash & Linux, HTML & CSS. Together they hold 2 copy-ready snippets for this task.
Is there anything to watch out for?
Yes. For "Tab Completion": Tab completion works for commands, file paths, and (with bash-completion or zsh plugins) for subcommands and flags of many tools including git, docker, kubectl, and ssh hosts. Install bash-completion for enhanced support in Bash.