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.