-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add list command #50
Add list command #50
Conversation
Update find command to exclude hidden directories. Add GNU find command
I'm not sure why, commands get wrapped. |
Looks fine now? |
It seems dollar signs in the last commands act like they are new line characters. I tried to escape them with backslash, but pre commit hook says Currently, merged commands are broken and won't work. This is what I inserted at the end of {
"title": "List of git repositories in multiple directories.",
"tip": "find -E /path1 /path2 /path3 \\( -regex '.*/\\.git$' -not -regex '.*/\\..*/\\.git$' \\) -type d -print0 | xargs -0 -I {} dirname {}",
"alternatives": [
"find /path1 /path2 /path3 -regextype posix-egrep \\( -regex '.*/\\.git$' -not -regex '.*/\\..*/\\.git$' \\) -type d -print0 | xargs -0 -I {} dirname {}"
]
} And this is the generated markdown: ## List of git repositories in multiple directories. ```sh find -E /path1 /path2 /path3 \( -regex '.*/\.git -not -regex '.*/\..*/\.git \) -type d -print0 | xargs -0 -I {} dirname {} ``` __Alternatives:__ ```sh find /path1 /path2 /path3 -regextype posix-egrep \( -regex '.*/\.git -not -regex '.*/\..*/\.git \) -type d -print0 | xargs -0 -I {} dirname {} ``` Also, this is the commands what I actually intended and confirmed to work: # tip
find -E /path1 /path2 /path3 \( -regex '.*/\.git$' -not -regex '.*/\..*/\.git$' \) -type d -print0 | xargs -0 -I {} dirname {}
# alternatives
find /path1 /path2 /path3 -regextype posix-egrep \( -regex '.*/\.git$' -not -regex '.*/\..*/\.git$' \) -type d -print0 | xargs -0 -I {} dirname {} Please take a look at this. Thanks! |
I am in a transit now. //cc @spacewander got some spare time? 😇 |
Maybe a bug of doxie? |
@spacewander Right, my bad...he was referring to the formatting issue, I was thinking it was something to do with the //cc @tomekwi |
@hemanth
to
Use |
Add list command
Hi,
I added a bash command to list git repositories in certain directories.
It doesn't start with git, but I found it useful in my workflow. I thought it might help some people.
Thanks!