Comments (7)
Can you provide an example?
from gist.
Sorry, I guess I meant gist create
:
$ gist create /tmp/my_pastebin_file
Waiting for Emacs...
from gist.
So the usage might be clearer to me as:
gist create [--public] [--encrypt] <desc> [FILES ...]
from gist.
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.
@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.
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.
@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)
- How to run tests? HOT 2
- used to work well but can't get through after token updated HOT 7
- Switch CI to github actions
- Remove support for python3.{3,4}
- Discontinue use of 'python setup.py test'
- Fixed unit test that fails when run using github actions
- Switch to using github action badges
- ValueError: Unable to load configuration file: readfp() got an unexpected keyword argument 'source' HOT 1
- Use Authorization HTTP header, since access_token is deprecated HOT 4
- Should not advise users to install with `sudo` HOT 1
- ValueError: Unable to load configuration file: readfp() got an unexpected keyword argument 'source' HOT 3
- Switch from docopt to argparse
- Filename is not being properly set
- `gist archive` should decrypt encrypted files
- Error with gist create HOT 4
- gist edit fails with ERROR[gist] handle_gist_edit() takes 2 positional arguments but 4 were given HOT 6
- Switch to using poetry
- Use `unittest.mock.auto_spec` in `test_cli_parser.py`
- Add unit tests to cover `client.py`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gist.