-
Notifications
You must be signed in to change notification settings - Fork 2.3k
lib/helpers: new function _bash-it-find-in-ancestor()
#1952
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@cornfeedhobo I don't mean to spam you, but you said you'd have time! ♥ |
f942c1f to
5f56674
Compare
|
@gaelicWizard Hey no worries. I did indeed invite it. This looks good and I like what you're thinking. Here are my thoughts and questions:
Thanks again for all your hard work! This is great stuff. |
I just linted the themes folder and put |
According to the British Journal of General Practice (via NIH's National Library of Medicine) There isn't a word for it and a bunch of answers on Stack Overflow...there isn't a word for it... but I saw someone say "kin" so now I'mma try that! "uncle" just seems too...old male person |
It is! 😜 The |
65f6fca to
4ab0089
Compare
@gaelicWizard How about |
_find_uncle()_bash_it_find_kin()
|
I guess |
_bash_it_find_kin()_bash_it_find_in_ancestor()
|
Ok! I rewrote the function to take any number of files to look for, renamed it to |
f5a2324 to
b456863
Compare
davidpfarrell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kind of funny I just coded up a similar script yesterday:
Script called findup that walks up the path but uses standard find elements for your search query.
I have some comments on the function - Overall likely a useful addition to the library !
|
ok, I've just pushed an updated version |
_bash_it_find_in_ancestor()_bash-it-find-in-ancestor()
davidpfarrell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we're getting closer !
New function to do a search looking for a sibling to a parent of the current directory, for example to find `../../.git` to indicate that `$PWD` is inside a git repository.
Add `composure.sh` citation with examples and rewrite internal comments to describe the code flow.
|
@davidpfarrell, @cornfeedhobo, @NoahGorny, it seems like 'returns' isn't actually one of our standard citations. Would it be helpful if I started adding these to other functions as I go? ALSÖ, what about 'about' versus '_about'? |
davidpfarrell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we might still have some citation stuffs to work out (about, return, etc).
I don't have a lot to say on that so I'll leave it to others.
I'm happy with the parts I was concerned about, so I'm approving it, although there might still be some work before it gets merged ...
|
/off-topic
OK so at this point the
#inquiring_minds_want_to_knöw |
At some point in the ancient past, I added an autocarrot for "alsö" as seen in Mønti Pythøn ik den Høli Gräilen. 😆 🤣 |
NoahGorny
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well done @gaelicWizard and great review @davidpfarrell 😃
Description
New function to do a search looking for a sibling to a parent of the current directory, for example to find
../../.gitto indicate that$PWDis inside a git repository.Motivation and Context
This removes the remaining path traversal logic in the
gradleplugin and completion, and I suspect may be useful for SCM stuff in themes.Suggestions for a better function name welcome!!
How Has This Been Tested?
All tests pass.
Types of changes
Checklist:
clean_files.txtand formatted it usinglint_clean_files.sh.