# phpman > man > wrap-and-sort(1)

[WRAP-AND-SORT(1)](https://www.chedong.com/phpMan.php/man/WRAP-AND-SORT/1/markdown)                       General Commands Manual                      [WRAP-AND-SORT(1)](https://www.chedong.com/phpMan.php/man/WRAP-AND-SORT/1/markdown)



## NAME
       wrap-and-sort - wrap long lines and sort items in Debian packaging files

## SYNOPSIS
       **wrap-and-sort** [_options_]


## DESCRIPTION
       **wrap-and-sort** 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.  **wrap-and-sort**  sorts  the  package  lists in Debian control files and all _.dirs_,
       _.docs_, _.examples_, _.info_, _.install_, _.links_, _.maintscript_, and  _.manpages_  files.  Beside  that
       **wrap-and-sort** removes trailing spaces in these files.

       This script should be run in the root of a Debian package tree. It searches for _control_, _con__‐
       _trol*.in_, _copyright_, _copyright.in_, _install_, and _*.install_ in the _debian_ directory.


## OPTIONS
### -h --help
              Show this help message and exit.

### -a --wrap-always
              Wrap all package lists in the Debian _control_ file even if they do not exceed the  line
              length limit and could fit in one line.

### -s --short-indent
              Only indent wrapped lines by one space (default is in-line with the field name).

### -b --sort-binary-packages
              Sort binary package paragraphs by name.

### -k --keep-first
              When sorting binary package paragraphs, leave the first one at the top.

              Unqualified [**debhelper**(7)](https://www.chedong.com/phpMan.php/man/debhelper/7/markdown) configuration files are applied to the first package.

### -n --no-cleanup
              Do not remove trailing whitespaces.

### -t --trailing-comma
              Add  a  trailing comma at the end of the sorted fields.  This minimizes future differ‐
              ences in the VCS commits when additional dependencies are appended or removed.

### -d --debian-directory=
              Location of the _debian_ directory (default: _./debian_).

### -f --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.

### -v --verbose
              Print all files that are touched.

       **--max-line-length=**_max_line_length_
              Set the maximum allowed line length. Package lists in the Debian _control_ file that ex‐
              ceed 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.


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

       Both are released under the ISC license.



DEBIAN                                    Debian Utilities                          [WRAP-AND-SORT(1)](https://www.chedong.com/phpMan.php/man/WRAP-AND-SORT/1/markdown)
