diff options
author | merakor <cem@ckyln.com> | 2021-03-12 18:43:48 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2021-03-12 18:43:48 +0000 |
commit | 910bcc865a804ee926d02817958e655643cec07b (patch) | |
tree | 178df42b68b08bbe6fd344d83056bb5517998ae3 | |
parent | 156998b9981c9f5c8443c154d50c9b476bad6a0c (diff) | |
download | cpt-910bcc865a804ee926d02817958e655643cec07b.tar.gz |
docs: update
FossilOrigin-Name: c42ae46057a92c938cb74a268438c2903297d007d4688903f6e8161291002ce9
-rw-r--r-- | man/cpt-search.1 | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/man/cpt-search.1 b/man/cpt-search.1 index b20547e..05452bd 100644 --- a/man/cpt-search.1 +++ b/man/cpt-search.1 @@ -25,6 +25,64 @@ Show help message .It Fl v , -version Print version information .El +.Sh EXAMPLES +Below are usage examples for +.Nm , +which is a simple yet powerful utility for querying packages. +.Ss Using wildcards +.Nm +expands POSIX shell wildcards when searching for packages. +.Bd -offset indent -literal +$ cpt-search 'emacs*' +/home/cem/repos/main/community/emacs +/home/cem/repos/main/community/emacs-nox +/home/cem/repos/kiss-community/community/emacs +/var/db/cpt/installed/emacs +.Ed +.Ss Limiting search to a single package +When the +.Fl s +flag is given, +.Nm +will only output the first instance of the package. +.Bd -offset indent -literal +$ cpt-search -s emacs +/home/cem/repos/main/community/emacs +.Ed +.Pp +Here is what happens when I don't use the +.Fl s +flag: +.Bd -offset indent -literal +$ cpt-search emacs +/home/cem/repos/main/community/emacs +/home/cem/repos/kiss-community/community/emacs +/var/db/cpt/installed/emacs +.Ed +.Ss Removing installed database from the search results. +When you use the +.Fl d +flag, +.Nm +will omit the installed package database from the result. Using the above +.Em emacs +query with this flag will result in: +.Bd -offset indent -literal +$ cpt-search -d emacs +/home/cem/repos/main/community/emacs +/home/cem/repos/kiss-community/community/emacs +.Ed +.Ss Searching other instances of the current package +Sometimes you want to check whether there are other instances of your package, +especially if you are using multiple repositories from different sources. Let's +say that you are in the +.Pa ~/repos/main/community/emacs +directory and you want to know whether this same package exists in a different +repository. You then run the following command: +.Bd -offset indent -literal +$ cpt-search -od +/home/cem/repos/kiss-community/community/emacs +.Ed .Sh AUTHOR .An Cem Keylan Aq Mt cem@ckyln.com .Sh LICENSE |