Git Product home page Git Product logo

Comments (6)

 avatar commented on June 4, 2024 1

Just tested it and it works, thanks man.

from mal.

ryukinix avatar ryukinix commented on June 4, 2024

Thanks for filling this issue. Yes, seems a really old bug of argparse. Some funny answers of people wanting optparser get be un-deprecated.

For now, I don't know any workaround. Maybe would be possible escape the argument as /-Bass and remove / internally since this character is not possible inside of username because conflicts with HTTP URL. But this solution is a quite awful... and I think that there is no hope for argparse since is a bug of almost 8 years.

I need think a little about it.

from mal.

ryukinix avatar ryukinix commented on June 4, 2024

Actually, there is a workaround:

mal list --user=-Bass

from mal.

ryukinix avatar ryukinix commented on June 4, 2024

Since this is a problem with argparse and not correlated with mal, I'm closing this. I hope you enjoy the software, @sothym

from mal.

bradenbest avatar bradenbest commented on June 4, 2024

Strange. Why doesn't mal list --user -- -Bass work? The -- is meant to tell the arg parser that every arg from here on out is to be interpreted literally. I.e. ignore -. I always implement this in my user interfaces. And it also exists in the coreutils:

cd -- -some-dir # cd to ./-some-dir/
rm -- -r # remove the file named "-r"
ls -l -- -l # lists -l if it exists, in long form

I would absolutely expect an arg parsing library to implement this, so it's strange that it doesn't.

Either way, good workaround.

from mal.

ryukinix avatar ryukinix commented on June 4, 2024

Yes, this is a common thing on gnu stuff, but until I now argparse is not correlated to gnu software.

from mal.

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.