From 4673ad6c89bbdca632b22edfc2ef35486b7a635b Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Sat, 1 Jul 2023 15:21:32 +0200 Subject: feat(search): add subcommand to search across the packaging group Search for an expression across the GitLab packaging group. To use a filter, include it in your query. You may use wildcards (*) to use glob matching. Available filters for the blobs scope: path, extension. Every usage of the search command must be authenticated. Consult the 'pkgctl auth' command to authenticate with GitLab or view the authentication status. This command uses bats for pretty printing the results including line numbers and syntax highlighting. Component: pkgctl search Co-authored-by: Christian Heusel Co-authored-by: Levente Polyak --- contrib/completion/bash/devtools.in | 9 +++++++++ contrib/completion/zsh/_devtools.in | 8 ++++++++ 2 files changed, 17 insertions(+) (limited to 'contrib') diff --git a/contrib/completion/bash/devtools.in b/contrib/completion/bash/devtools.in index b974257..155bb7e 100644 --- a/contrib/completion/bash/devtools.in +++ b/contrib/completion/bash/devtools.in @@ -139,6 +139,7 @@ _pkgctl_cmds=( diff release repo + search version ) _pkgctl_args=( @@ -331,6 +332,14 @@ _pkgctl_repo_web_args=( _pkgctl_repo_web_opts() { _filedir -d; } +_pkgctl_search_args=( + --json + --no-default-filter + -h --help +) +_pkgctl_search_opts() { :; } + + _pkgctl_diff_args=( -l --list -d --diffoscope diff --git a/contrib/completion/zsh/_devtools.in b/contrib/completion/zsh/_devtools.in index 35ab2dc..120b47a 100644 --- a/contrib/completion/zsh/_devtools.in +++ b/contrib/completion/zsh/_devtools.in @@ -139,6 +139,13 @@ _pkgctl_repo_web_args=( '*:git_dir:_files -/' ) +_pkgctl_search_args=( + '--json[Enable printing results in JSON]' + '--no-default-filter[Do not apply default filter (like -path:keys/pgp/*.asc)]' + '(-h --help)'{-h,--help}'[Display usage]' + '1:query' +) + _arch_nspawn_args=( '-C[Location of a pacman config file]:pacman_config:_files -g "*.conf(.)"' '-M[Location of a makepkg config file]:makepkg_config:_files -g "*.conf(.)"' @@ -252,6 +259,7 @@ _pkgctl_cmds=( "diff[Compare package files using different modes]" "release[Release step to commit, tag and upload build artifacts]" "repo[Manage Git packaging repositories and their configuration]" + "search[Search for an expression across the GitLab packaging group]" "version[Show pkgctl version information]" ) -- cgit v1.2.3-70-g09d2