initial commmit
This commit is contained in:
commit
9e48b48173
4 changed files with 215 additions and 0 deletions
44
README.md
Normal file
44
README.md
Normal file
|
@ -0,0 +1,44 @@
|
|||
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
xdg-desktop-search [ OPTIONS ] SEARCH ...
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
- `SEARCH`: Search .desktop files with search directives containing this
|
||||
string. The searched directives are "Name" and "Exec" by default but can be
|
||||
overridden using the -s option (see below).
|
||||
|
||||
## Options
|
||||
|
||||
- `-h`, `--help`: Print this message and exit.
|
||||
|
||||
- `-v`, `--verbose`: Print directives in found .desktop files.
|
||||
|
||||
- `-d STRING`, `--show-directive STRING`: Instead of printing all directives
|
||||
when searching in verbose mode, print only this directive (e.g. "Name").
|
||||
Option can be repeated to print multiple directives.
|
||||
|
||||
- `-s STRING`, `--search-directive STRING`: Instead of searching directives
|
||||
"Name" and "Exec" for strings containing SEARCH, search the given directive
|
||||
instead (e.g. "Comment"). Option can be repeated to search in multiple directives.
|
||||
|
||||
|
||||
## Return Values
|
||||
|
||||
The command returns 0 if .desktop files were found that match the specified
|
||||
criteria, 1 on usage error and 2 if no matching .desktop files were found.
|
||||
|
||||
## Example
|
||||
|
||||
Search for the string "firefox" in all .desktop files found in the path
|
||||
specified by `XDG_DATA_DIRS`. To match, the string "firefox" must be contained
|
||||
in either the "Exec" or the "Comment" directive. List the matching files, also
|
||||
show the "Exec" and "TryExec" directives in each found file.
|
||||
|
||||
```shell
|
||||
xdg-desktop-search -s Exec -s Comment -v -d Exec -d TryExec firefox
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue