Skip to content

Commit

Permalink
allow more options to be configured in paru.conf and command line arg…
Browse files Browse the repository at this point in the history
…uments (#603)

* add more options to configuration file

* add more command line arguments

* update completions

* update paru.conf

* update man pages to document more config options

* revert adding comments to config file

* Revert "update paru.conf"

This reverts commit 11e8553.

* revert adding pacman argument to man pages
  • Loading branch information
getchoo authored Dec 13, 2021
1 parent dbf5d8a commit 10ae8ee
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion completions/bash
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ _paru() {
noconfirm noprogressbar noscriptlet quiet root verbose
repo aur aururl clonedir makepkg mflags pacman git gitflags sudo sudoflags
asp gpg gpgflags fm fmflags completioninterval sortby searchby limit upgrademenu
asp gpg gpgflags fm fmflags pager completioninterval sortby searchby limit upgrademenu
removemake noremovemake cleanafter nocleanafter rebuild rebuildall norebuild
rebuildtree redownload noredownload redownloadall pgpfetch nopgpfetch useask
nouseask savechanges nosavechanges combinedupgrade nocombinedupgrade
Expand Down
1 change: 1 addition & 0 deletions completions/fish
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ complete -c $progname -n "not $noopt" -l git -d 'Git command to use' -f
complete -c $progname -n "not $noopt" -l asp -d 'Asp command to use' -f
complete -c $progname -n "not $noopt" -l gpg -d 'Gpg command to use' -f
complete -c $progname -n "not $noopt" -l fm -d 'File manager to use' -f
complete -c $progname -n "not $noopt" -l pager -d 'Pager command to use' -f
complete -c $progname -n "not $noopt" -l completioninterval -d 'Refresh interval for completion cache' -f
complete -c $progname -n "not $noopt" -l sortby -d 'Sort AUR results by a specific field during search' -xa "{votes,popularity,id,baseid,name,base,submitted,modified}"
complete -c $progname -n "not $noopt" -l searchby -d 'Search for AUR packages by querying the specified field' -xa "{name,name-desc,maintainer,depends,checkdepends,makedepends,optdepends}"
Expand Down
1 change: 1 addition & 0 deletions completions/zsh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ _pacman_opts_common=(
'--gpg[gpg command to use]:gpg:_files'
'--fm[file manager to use]:fm:_files'
'--asp[asp command to use]:asp:_files'
'--pager[pager command to use]:pager:_files'

'--sortby[Sort AUR results by a specific field during search]:sortby options:(votes popularity id baseid name base submitted modified)'
'--upgrademenu[Show a detailed list of updates with the option to skip any]'
Expand Down
5 changes: 5 additions & 0 deletions man/paru.8
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,11 @@ Directory used to download and run PKGBUILDs.
The command to use for \fBmakepkg\fR calls. This can be a command in
\fBPATH\fR or an absolute path to the file.

.TP
.B \-\-makepkgconf <file>
Specifies a \fBmakepkg.conf\fR file to use in the chroot enviorment. The file
can only be an absolute path to the file.

.TP
.B \-\-pacman <command>
The command to use for \fBpacman\fR calls. This can be a command in
Expand Down
4 changes: 4 additions & 0 deletions man/paru.conf.5
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ to never be refreshed. Defaults to 7.
.B PacmanConf = path/to/pacman.conf
The pacman config file to use.

.TP
.B MakepkgConf = path/to/makepkg.conf
The makepkg config file to use.

.TP
.B DevelSuffixes = Suffixes...
Suffixes that paru will use to decide if a package is a devel package.
Expand Down
1 change: 1 addition & 0 deletions src/command_line.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ impl Config {
Arg::Long("asp") => self.asp_bin = value?.to_string(),
Arg::Long("bat") => self.bat_bin = value?.to_string(),
Arg::Long("fm") => self.fm = Some(value?.to_string()),
Arg::Long("pager") => self.pager_cmd = Some(value?.to_string()),
Arg::Long("config") => self.pacman_conf = Some(value?.to_string()),

Arg::Long("builddir") | Arg::Long("clonedir") => self.build_dir = value?.into(),
Expand Down
1 change: 1 addition & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,7 @@ impl Config {
"Limit" => self.limit = value?.parse()?,
"CompletionInterval" => self.completion_interval = value?.parse()?,
"PacmanConf" => self.pacman_conf = Some(value?),
"MakepkgConf" => self.makepkg_conf = Some(value?),
"DevelSuffixes" => {
self.devel_suffixes
.extend(value?.split_whitespace().map(|s| s.to_string()));
Expand Down

0 comments on commit 10ae8ee

Please sign in to comment.