Implement `whereis`

Open
#396 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Quiet
Tech stack
rust
Domain
cli

Research direction

Start with misc-utils/whereis.1.adoc and compare the required behavior with the original C source. Investigate how clap can represent cumulative search restrictions and resets for command-line name patterns; done means implementing whereis with the documented -b, -m, and -s behavior.

Written by the indexing model from the issue text.

Description

Implementing https://github.com/util-linux/util-linux/blob/master/misc-utils/whereis.1.adoc

I'll am taking this up, but facing the following issue:

The search restrictions (options -b, -m and -s) are cumulative and apply to the subsequent name patterns on the command line. Any new search restriction resets the search mask. For example,

whereis -bm ls tr -m gcc

searches for "ls" and "tr" binaries and man pages, and for "gcc" man pages only.

whereis has sticky, resettable options and clap doesn't have a clear support for doing the same.
(The approach would be to use .trailing_var_arg(true) and use a simple match as in the original C source. This defeats the purpose of clap)

Dominant language
Rust
Stars
219
Forks
59
Avg merge
4h 8m
Merged PRs (30d)
5

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from uutils/util-linux

All issues in uutils/util-linux

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.