WRAP-AND-SORT(1)

πŸ“¦
version 2.26.11ubuntu1 Β· 4 versions
, in debian trixie, epel 10, epel 9, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– WRAP-AND-SORT(1) πŸ’–

the iconic little helper from the General Commands Manual section, bestie πŸŽ€


✨ NAME ✨

wrap-and-sort β€” wrap long lines and sort items in Debian packaging files πŸ¦‹


🌸 SYNOPSIS 🌸

wrap-and-sort [options]

πŸ‘‘ DESCRIPTION πŸ‘‘

okay so picture this: your Debian control files are a mess and you're just standing there like πŸ™ˆ. Enter wrap-and-sort. It wraps the package lists in Debian control files. By default the lists will only split into multiple lines if the entries are longer than the maximum line length limit of 79 characters. no cap, it's that simple πŸ’…

It also sorts the package lists in Debian control files, plus all the .dirs, .docs, .examples, .info, .install, .links, .maintscript, and .manpages files. and bestie it doesn't stop there β€” it also removes trailing spaces in these files. the way that it just cleans everything up for you 😭✨

🫢 run this script in the root of a Debian package tree. It searches for control, control*.in, copyright, copyright.in, install, and *.install in the debian directory.

πŸ’… OPTIONS πŸ’…

  • -h, --help β€” show this help message and exit. It will also print the default values for the options below, so like, very generous of it πŸ₯°
  • -a, --[no-]wrap-always β€” wrap all package lists in the Debian control file, even if they don't exceed the line length limit and could totally fit in one line. no holding back πŸ’–
  • -s, --[no-]short-indent β€” indent wrapped lines by a single space, instead of in-line with the field name. cozy little indent πŸŽ€
  • -b, --[no-]sort-binary-packages β€” sort binary package paragraphs by name. alphabetical queen πŸ‘‘
  • -k, --[no-]keep-first β€” when sorting binary package paragraphs, leave the first one at the top.

unqualified debhelper(7) configuration files are applied to the first package. (that's the why, bestie, iykyk)

  • -n, --[no-]cleanup β€” remove trailing whitespaces. bye bye invisible chaos πŸ’€
  • -t, --[no-]trailing-comma β€” add a trailing comma at the end of the sorted fields. This minimizes future differences in the VCS commits when additional dependencies are appended or removed. future-you will be obsessed with past-you for this 🌈
  • -d path, --debian-directory=path β€” location of the debian directory (default: ./debian). πŸ“
  • -f file, --file=file β€” wrap and sort only the specified file. You can specify this parameter multiple times. All supported files will be processed if no files are specified. picky and valid πŸ“
  • -v, --verbose β€” print all files that are touched. spill the tea about every single file πŸ“’
  • --max-line-length=max_line_length β€” set the maximum allowed line length. Package lists in the Debian control file that exceed this length limit will be wrapped.

the default maximum line length is 79 characters.

  • -N, --dry-run β€” do not modify any file, instead only print the files that would be modified. look, don't touch ✨
  • --experimental-rts-parser β€” temporary option accepted for compatibility with an experiment. It no longer does anything. Please remove any use of it. πŸͺ¦
⚠️ real talk: that last one is a leftover from an experiment, it does literally nothing now, and you should remove any use of it fr fr.

πŸ’œ AUTHORS πŸ’œ

wrap-and-sort and this manpage have been written by Benjamin Drung <bdrung@debian.org>.

Both are released under the ISC license. 🫢


and that's the whole page, bestie β€” this one came out of the Debian Utilities corner of the world, tagged DEBIAN, and it's WRAP-AND-SORT(1) if you ever need to find it again. slay, go format your control files. πŸ’–βœ¨πŸŽ€