Coder Social home page Coder Social logo

Comments (7)

rtfmoz2 avatar rtfmoz2 commented on June 16, 2024

Can you provide an example?

from gist.

nealmcb avatar nealmcb commented on June 16, 2024

Sorry, I guess I meant gist create:

$ gist create /tmp/my_pastebin_file
Waiting for Emacs...

from gist.

nealmcb avatar nealmcb commented on June 16, 2024

So the usage might be clearer to me as:
gist create [--public] [--encrypt] <desc> [FILES ...]

from gist.

jdowner avatar jdowner commented on June 16, 2024

I think this is something that could be easily supported if gist was using argparse. However it is currently using docopt which affords less flexibility in parsing the arguments. I have created a ticket to switch from docopt to argparse, which is something I would like to do anyway (see #89). Hopefully that change will resolve this issue as well.

@nealmcb One thing I do want to mention is that the original interface must continue to work. I'm happy if it can be flexible enough to support <desc> after the options, but I do not want to break the interface for other users.

from gist.

jdowner avatar jdowner commented on June 16, 2024

@nealmcb I've completed the transition from docopt to argparse. I think it provides the flexibility you're asking for. Can I ask you to download the latest version from master to make sure it works? If it does, I'll close this issue and push a new version to pypi.

from gist.

nealmcb avatar nealmcb commented on June 16, 2024

Thanks again. I installed the latest (which is still labeled with version 0.9.2) and it works with the more natural syntax I like:

gist create --public "test gist command" README.rst 

but not with this usage, as still documented in the README:

gist create "test gist command desc first" --public README.rst

from gist.

jdowner avatar jdowner commented on June 16, 2024

@nealmcb Sorry to leave you hanging on this. I tried several different approaches to support this additional syntax but it became quite convoluted and brittle. So I have decided that I am not going to make this change and keep the current syntax.

from gist.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.