GithubHelp home page GithubHelp logo

Comments (6)

unhammer avatar unhammer commented on May 22, 2024 1

I'd also love to have the -u / -uu as in ripgrep – it's annoying enough the first time you don't find something because it's in .gitignore, so it'd be nice if the UI to turn it off were consistent with other "modern unix tools" you're likely to have :-)

from fd.

sharkdp avatar sharkdp commented on May 22, 2024

Let's consider all of fd's current command-line options:

  • -a/--absolute-path => not related to ripgrep
  • -s, --sensitive => ripgrep uses -s, --case-sensitive => change to ripgrep's format
  • -f, --follow => ripgrep also uses --follow, but uses -L for the short flag (like find) => change to ripgrep's format
  • -p, --full-path => not related to ripgrep
  • -H, --hidden => ripgrep also uses --hidden, there is no short flag
  • -n, --no-color => ripgrep uses --color never because there are more options => we would need to implement --color always and --color auto (fd's default) first => for now, I'll leave this as-is.
  • -I, --no-ignore => ripgrep also uses --no-ignore, there is no short flag

Considering ripgrep's options, there is

  • -u, --unrestricted: an alias for --no-ignore => could be implemented
  • two occurences of -u/--unrestricted: an alias for --no-ignore --hidden => could be implemented
  • three occurences ...: not relevant for fd

from fd.

epipping avatar epipping commented on May 22, 2024

@sharkdp Using -L for following/dereferencing (i.e., treating a symlink like the object that it points to) is rather common. And it's not uncommon that the single-letter option does not use the first letter of the option name:

  • GNU ls has -L, --dereference and BSD ls also uses -L for this purpose
  • GNU and BSD find both have -L and -follow (the latter is deprecated)
  • GNU cp has -L, --dereference and BSD cp also uses -L.
  • rsync has -L, --copy-links which behaves in a similar fashion.

I would thus like to suggest going with ripgrep's -L, --follow.

(it's a bit of a stretch but one could even argue that curl's -L, --location fits the pattern if you view redirects as symlinks).

from fd.

sharkdp avatar sharkdp commented on May 22, 2024

@epipping Fair points, you convinced me. Changed the action above.

from fd.

sharkdp avatar sharkdp commented on May 22, 2024

-L is now the short-option for --follow. --dereference can be used as an alias.

from fd.

sharkdp avatar sharkdp commented on May 22, 2024

I would like to keep the command-line interface as clean and simple as possible (i.e., I don't want the -h text to be several pages long), but adding -u seems like a good idea. We could possible hide it from the standard -h text and add it as a hidden option that would only be mentioned in a man page. It would be great if you could open a new ticket to track this.

from fd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.