Skip to content
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

File type selection without extension possible? #14

Closed
Gen2ly opened this issue Aug 11, 2012 · 2 comments
Closed

File type selection without extension possible? #14

Gen2ly opened this issue Aug 11, 2012 · 2 comments

Comments

@Gen2ly
Copy link

Gen2ly commented Aug 11, 2012

Is it possible to select the language without having to use the extension? I noticed by accident that I can do this by doing:

jist -p -d "example description" -f file.sh file

and then pushing it:

git init
git remote add reponame git@gist.github.com:<number>.git
git add file
git commit -a -m "message"
git push --force reponame master

where file is the filename without the extension. and by doing this, I am able to get syntaxhighlighting without the extension example.

Because of this I was wondering if it was possible, or could this just be a loophole?

@kyrylo
Copy link

kyrylo commented Aug 14, 2012

I cannot reproduce this.

When I do jist -d "example description" -f file.sh file, I create a gist with the name of file.sh and with Shell syntax highlighting. Next, when I initialize a git repository and push file to reponame, my gist changes, so its filename becomes file and Shell syntax highlighting disappears. I get no highlighting at all.

@ConradIrwin
Copy link
Owner

@Gen2ly This would be very useful! Unfortunately the ability is not exposed via the API that jist is using (http://developer.github.com/v3/gists/). The auto-detection done by "git push"ing to the remote looks pretty buggy (in your example it's highlighted the file as Perl —search for "language": https://api.github.com/gists/3242078) so I don't really want to make jist use this directly.

If you can think of a reliable way to do it, please do re-open the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants