Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow more options to be configured in paru.conf and command line arguments #603

Merged
merged 9 commits into from
Dec 13, 2021
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
10 changes: 10 additions & 0 deletions man/paru.8
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,21 @@ 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
\fBPATH\fR or an absolute path to the file.

.TP
getchoo marked this conversation as resolved.
Show resolved Hide resolved
.B \-\-config <file>
Specifies a \fBpacman.conf\fR file to use in the chroot enviorment. The file
can only be an absolute path to the file.

.TP
.B \-\-git <command>
The command to use for \fBgit\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