Code Monkey home page Code Monkey logo

Comments (5)

Slackadays avatar Slackadays commented on May 23, 2024

Clipboard intentionally breaks the rules here, so changing this syntax to only be the other option would make Clipboard worse. However, I'm open to adding a different supported syntax, but what would you do if you needed to copy a file with name "-c"?

from clipboard.

sparr avatar sparr commented on May 23, 2024

The standard solution is to have a parameter named -- which stops parsing of later dashes as options and treats them as literal strings. So clipboard copy -c 1 -- -c would copy the file named -c to clipboard #1 (if -c specifies the clipboard number).

https://unix.stackexchange.com/questions/11376/what-does-double-dash-mean

from clipboard.

Slackadays avatar Slackadays commented on May 23, 2024

Done, added in latest commit f9e83ed and we don't have to check for -- because Clipboard's current code will only check for the -c or --clipboard= once.

from clipboard.

sparr avatar sparr commented on May 23, 2024

Does that mean that you have to specify -c 1 -c 1 to copy files named -c and 1?

from clipboard.

Slackadays avatar Slackadays commented on May 23, 2024

That's one way you could do it, or just 1 -c since the current logic only checks the third argument for the presence of -c (the first being clipboard, the second (action) and the third 1)

from clipboard.

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.