set -l commands add apply archive change channel clone credit diff fork init log ls mv pull push record remote remove reset unrecord help
complete -f -c pijul
complete -f -c pijul -l add -d 'Adds a path to the tree'
complete -f -c pijul -l apply -d 'Applies one channel to another'
complete -f -c pijul -l archive -d 'Creates an archive of the repository'
# complete -f -c pijul -l change
# complete -f -c pijul -l channel
complete -f -c pijul -l clone -d 'Clones an existing pijul repository'
complete -f -c pijul -l credit -d 'Shows which patch last affected each line of every file'
complete -f -c pijul -l diff -d 'Shows difference between two channels/changes'
complete -f -c pijul -l fork -d 'Create a new channel'
complete -f -c pijul -l init -d 'Initializes an empty pijul repository'
complete -f -c pijul -l log -d 'Show the entire log of changes'
complete -f -c pijul -l ls -d 'List files tracked by pijul'
complete -f -c pijul -l mv -d 'Moves a file in the working copy and the tree'
complete -f -c pijul -l pull -d 'Pulls changes from a remote upstream'
complete -f -c pijul -l push -d 'Pushes changes to a remote upstream'
complete -f -c pijul -l record -d 'Creates a new change'
complete -f -c pijul -l remote -d 'Manages remote repositories'
complete -f -c pijul -l remove -d 'Removes a file from the tree and pristine'
complete -f -c pijul -l reset -d 'Reverts the working copy to the given hash'
complete -f -c pijul -l unrecord -d 'Unrecords all changes up to the given hash'
complete -f -c pijul -l help -d 'Print pijul help text'