Last active
July 30, 2021 14:39
-
-
Save luzpaz/58cabcb2eee1ada2889d247823e62273 to your computer and use it in GitHub Desktop.
Codespell Tips
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Find a line that doesn't have '->' in it: ^(.(?!(->)))*$ | |
Find a line with missing commas: ^(?=\w+->(?!\w+$)(?:\w+, )*\w+(?!,)$).+ | |
# Copying commits from other repos | |
## This will print the diff, | |
## then grep all lines that start with '+' and a letter or number (needs other conditions as well | |
## the truncates the '+' of the beginning of the result | |
## copies everything to the buffer | |
git show | grep '^+[a-zA-Z0-9]' | cut -c 2- | pbcopy | |
## append the last 5 commits with the same regex, to some other file | |
git show -n 5 | grep '^+[a-zA-Z0-9]' | cut -c 2- >> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment