-
Notifications
You must be signed in to change notification settings - Fork 2
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
Enhancement request: list of languages #2
Comments
Try -
|
Cool, thanks for being so responsive. Further enhancement: Alphabetizing the languages and putting one language per output line makes it so much easier to find your favourite language. :) |
I'm aware you've closed the issue, but here's a suggestion: diff --git a/gitinit/gitinit.py b/gitinit/gitinit.py
index 5acae5f..0747f8f 100755
--- a/gitinit/gitinit.py
+++ b/gitinit/gitinit.py
@@ -118,12 +118,9 @@ def main():
if args.list:
print "List of languages supported right now:"
- l = []
gi_list = manager.all_gitignores()
- for gi in gi_list:
- if gi:
- l.append(gi.split('/')[-1].split('.')[0])
- print ', '.join(l)
+ l = [gi.split('/')[-1].split('.')[0].lower() for gi in gi_list if gi]
+ print ', '.join(sorted(l))
return
language = args.language or 'generic'
diff --git a/setup.py b/setup.py
index 8590ef6..d643615 100644
--- a/setup.py
+++ b/setup.py
@@ -6,7 +6,7 @@ __readme__ = os.path.join(__currdir__, 'README')
setup(
name="gitinit",
- version="1.0.6",
+ version="1.0.6.2",
author="Bibhas C Debnath",
author_email="me@bibhas.in",
description=("Initiates git with gitignore for provided language"), :) |
You know, I just came back home and on the road I was thinking about this particular piece of code. :D Will do this and check. :) |
Install the dev version from git and check the |
/me likes :) |
It would be pretty useful if gitinit had a “-L, --list” switch that listed all recognized languages. Of course I program in a limited set of languages and I will soon know which of those gitinit recognizes. For a new gitinit user, however, a list switch would be helpful.
Cheers (and thanks for a useful program).
The text was updated successfully, but these errors were encountered: