diff --git a/README.md b/README.md index 1aba40eb..85c0a8ad 100644 --- a/README.md +++ b/README.md @@ -17,24 +17,44 @@ Yay was created with a few objectives in mind and based on the design of [yaourt ## Features - AUR Tab completion +- Download PKGBuild from ABS or AUR +- Ask all questions first and then start building - Search narrowing (`yay linux header` will first search linux and then narrow on header) - No sourcing of PKGBUILD is done - The binary has no dependencies that pacman doesn't already have. - Sources build dependencies - Removes make dependencies at the end of build process -#### Custom Operations +#### Example of Custom Operations - `yay ` presents package selection menu -- `yay -Qstats` delivers system statistics -- `yay -Cd` cleans unneeded dependencies -- `yay -G` downloads PKGBuild from ABS or AUR -- `yay --gendb` generates development package DB used for devel updates. +- `yay -Ps` prints system statistics +- `yay -Pu` prints update list +- `yay -Yc` cleans unneeded dependencies +- `yay -Yg` `yay -g` downloads PKGBuild from ABS or AUR +- `yay -Y --gendb` generates development package DB used for devel updates. ### Changelog + +#### 2.296 +- New argument parsing @Morganamilo (check manpage or --help for new + information) +- yay -Qstats changed to yay -Ps or yay -P --stats +- yay -Cd changed to yay -Yc or yay -Y --clean +- yay -Pu (--upgrades) prints update list +- yay -Pn (--numberupgrades) prints number of updates +- yay -G also possible through -Yg or -Y --getpkgbuild (yay -G will be + discontinued once it's possible to add options to the getpkgbuild operation) +- yay now counts from 1 instead of 0 @Morganamilo +- Support for ranges when selecting packages @samosaara +- Pacaur style ask all questions first and download first @Morganamilo +- Updated vendor dependencies (Fixes pacman.conf parsing errors and PKGBUILD + parsing errors) +- Updated completions + #### 2.219 - Updated manpage - Updated --help diff --git a/cmd.go b/cmd.go index 952f549a..72e91235 100644 --- a/cmd.go +++ b/cmd.go @@ -32,6 +32,7 @@ operations: New operations: yay {-Y --yay} [options] [package(s)] + yay {-P --print} [options] yay {-G --getpkgbuild} [package(s)] Permanent configuration options: @@ -44,10 +45,16 @@ Permanent configuration options: --timeupdate Check package's modification date and version --notimeupdate Check only package version change +Print specific options: + -c --complete Used for completions + -d --defaultconfig Print current yay configuration + -n --numberupgrades Print number of updates + -s --stats Display system package statistics + -u --upgrades Print update list + Yay specific options: - --printconfig Prints current yay configuration - --stats Displays system information - --cleandeps Remove unneeded dependencies + -g --getpkgbuild Download PKGBuild from ABS or AUR + -c --clean Remove unneeded dependencies --gendb Generates development package DB used for updating. If no operation is provided -Y will be assumed @@ -399,8 +406,10 @@ func handleYay() (err error) { if err != nil { return } - } else if cmdArgs.existsArg("cleandeps") { + } else if cmdArgs.existsArg("c", "clean") { err = cleanDependencies() + } else if cmdArgs.existsArg("g", "getpkgbuild") { + err = handleGetpkgbuild() } else if len(cmdArgs.targets) > 0 { err = handleYogurt() } diff --git a/yay.8 b/yay.8 index c0cfbf98..d0a1e048 100644 --- a/yay.8 +++ b/yay.8 @@ -1,5 +1,5 @@ '\" t -.TH "YAY" "8" "2017-01-05" "Yay v2\&.219" "Yay Manual" +.TH "YAY" "8" "2018-01-31" "Yay v2\&.295" "Yay Manual" .nh .ad l .SH "NAME" @@ -21,6 +21,11 @@ This manpage only covers options unique to Yay\&. For other options see \fBpacma Perform yay specific operations\&. This is the default if no other operation is selected\&. .RE .PP +\fB\-P, --print\fR +.RS 4 +Perform yay specific print operations\&. +.RE +.PP \fB\-G, --getpkgbuild\fR .RS 4 Downloads PKGBUILD from ABS or AUR\&. @@ -37,22 +42,46 @@ These operations are extended to support the AUR as well as repo packages\&. \fB\-R\fR .RS 4 Yay will also remove cached data about devel packages\&. +.RE .SH "YAY OPTIONS (APPLY TO -Y AND --YAY)" .PP -\fB\fR +\fB\fR .RS 4 -Displays List of packages matching search terms and prompts the user on which packages to install(yogurt mode)\&. +Displays list of packages matching search terms and prompts the user on which packages to install(yogurt mode)\&. .RE .PP -\fB\--stats\fR +\fB\-g \-\-getpkgbuild\fR +.RS 4 +Downloads PKGBUILD from ABS or AUR\&. +.RE +.RE +.PP +\fB\-c \-\-clean\fR +.RS 4 +Remove unneeded dependencies\&. +.RE +.SH "PRINT OPTIONS (APPLY TO -P AND --PRINT)" +\fB\-d \-\-defaultconfig\fR +.RS 4 +Print current yay configuration\&. +.RE +.PP +\fB\-n \-\-numberupgrades\fR +.RS 4 +Print number of updates\&. +.RE +.PP +\fB\-s \-\-stats\fR .RS 4 Displays information about installed packages and system health\&. If there are orphaned or out-of-date packages, warnings will be displayed\&. .RE .PP -\fB\-\-printconfig\fR +\fB\-u \-\-upgrades\fR .RS 4 -Prints current yay configuration\&. +Print update list\&. .RE +.PP + .SH "PERMANENT CONFIGURATION SETTINGS" .PP These options will be saved to disk and reapplied next time Yay is ran\&. diff --git a/yay.fish b/yay.fish index 9db242c5..3cf844f4 100644 --- a/yay.fish +++ b/yay.fish @@ -30,12 +30,15 @@ complete -c $progname -n $noopt -a "-Q" -d "Query the package database" complete -c $progname -s D -f -l database -n $noopt -d 'Modify the package database' complete -c $progname -s Q -f -l query -n $noopt -d 'Query the package database' complete -c $progname -s G -f -l getpkgbuild -n $noopt -d 'Get PKGBUILD from ABS or AUR' -complete -c $progname -s P -f -l print -n $noopt -d 'Print information' complete -c $progname -s R -f -l remove -n $noopt -d 'Remove packages from the system' complete -c $progname -s S -f -l sync -n $noopt -d 'Synchronize packages' complete -c $progname -s T -f -l deptest -n $noopt -d 'Check if dependencies are installed' complete -c $progname -s U -f -l upgrade -n $noopt -d 'Upgrade or add a local package' complete -c $progname -s F -f -l files -n $noopt -d 'Query the files database' +complete -c $progname -s G -f -l getpkgbuild -n $noopt -d 'Get PKGBUILD from ABS or AUR' +complete -c $progname -s P -f -l print -n $noopt -d 'Print information' +complete -c $progname -s Y -f -l yay -n $noopt -d 'Yay specific operations' + complete -c $progname -s V -f -l version -d 'Display version and exit' complete -c $progname -s h -f -l help -d 'Display help' @@ -53,7 +56,27 @@ complete -c $progname -n "not $noopt" -l debug -d 'Display debug messages' -f complete -c $progname -n "not $noopt" -l gpgdir -d 'GPG directory to verify signatures' complete -c $progname -n "not $noopt" -l hookdir -d 'Hook file directory' complete -c $progname -n "not $noopt" -l logfile -d 'Specify alternative log file' + complete -c $progname -n "not $noopt" -l noconfirm -d 'Bypass any question' -f +complete -c $progname -n "not $noopt" -l topdown -d 'Shows repository packages first and then aur' -f +complete -c $progname -n "not $noopt" -l bottomup -d 'Shows aur packages first and then repository' -f +complete -c $progname -n "not $noopt" -l devel -d 'Check -git/-svn/-hg development version' -f +complete -c $progname -n "not $noopt" -l nodevel -d 'Disable development version checking' -f +complete -c $progname -n "not $noopt" -l afterclean -d 'Clean package sources after successful build' -f +complete -c $progname -n "not $noopt" -l noafterclean -d 'Disable package sources cleaning' -f +complete -c $progname -n "not $noopt" -l timeupdate -d 'Check package modification date and version' -f +complete -c $progname -n "not $noopt" -l notimeupdate -d 'Check only package version change' -f + +# Yay options +complete -c $progname -n $yayspecific -s c -l clean -d 'Remove unneeded dependencies' -f +complete -c $progname -n $yayspecific -s g -l getpkgbuild -d 'Download PKGBuild from ABS or AUR' -xa "$listall" -f +complete -c $progname -n $yayspecific -l gendb -d 'Display system package statistics' -f + +# Print options +complete -c $progname -n $print -s d -l defaultconfig -d 'Print current yay configuration' -f +complete -c $progname -n $print -s n -l numberupgrades -d 'Print number of updates' -f +complete -c $progname -n $print -s s -l stats -d 'Display system package statistics' -f +complete -c $progname -n $print -s u -l upgrades -d 'Print update list' -f # Transaction options (sync, remove, upgrade) for condition in sync remove upgrade