Skip to content
This repository has been archived by the owner on Apr 22, 2021. It is now read-only.

Adds tips to README #32

Merged
merged 9 commits into from
Aug 29, 2016
Merged

Adds tips to README #32

merged 9 commits into from
Aug 29, 2016

Conversation

ajm188
Copy link
Contributor

@ajm188 ajm188 commented Aug 29, 2016

Addresses #31

@paiweilai
Copy link
Contributor

lg2m mostly. can you also update docs/source/cli.rst? I missed that in #29

### Using with `grep`/`git grep` to find files

```bash
grep -l <search> | xargs undebt -p path/to/pattern.py
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably add an example which uses find:

find -name '*.js' | xargs grep -l ... | xargs undebt ...

(or a more robust solution with either -print0 + -0 or the ugly -exec syntax)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I was working out one with -exec (did not think to use xargs + grep) to show this kind of thing, but good call.

@ajm188
Copy link
Contributor Author

ajm188 commented Aug 29, 2016

@paiweilai yeah I'll update the docs

@ajm188
Copy link
Contributor Author

ajm188 commented Aug 29, 2016

@asottile @paiweilai updated. look good?

@evhub
Copy link
Contributor

evhub commented Aug 29, 2016

@ajm188 I feel like the tips section really belongs in cli.rst not in the readme, since it's more for learning how to use the CLI and less for learning the very basics of what Undebt is..

@ajm188
Copy link
Contributor Author

ajm188 commented Aug 29, 2016

@evhub I can get behind that. But I think in that case, the README should have a link to the tips section in the docs, so people can easily find it.

@paiweilai
Copy link
Contributor

paiweilai commented Aug 29, 2016

README has a link to cli.rst. We can add a sentence (something like: ... and tips for using undebt bla bla bla) and link to tips section.

### Using `find` to limit to a particular extension

```bash
find . -name '*.js' | xargs grep -l <search-text> | xargs undebt -p <path-to-pattern>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

find . is more simply written as find


.. code-block:: bash

grep -l <search-text> | xargs undebt -p <path-to-pattern>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my other comment appears to be lost. This command is useless without a glob such as grep -l ... **/*.js

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think I pushed a commit that marked the diff as old before I had a chance to read this. Fixing.

@paiweilai
Copy link
Contributor

lg2m now

@ajm188 ajm188 merged commit 43ac4a9 into Yelp:master Aug 29, 2016
@ajm188 ajm188 deleted the add-tips branch August 29, 2016 18:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants