Giter Site home page Giter Site logo

Comments (3)

leo-arch avatar leo-arch commented on May 23, 2024 1

Done! cp and mv should behave now exactly as c and m when using the sel keyword (and it's the last parameter). As per the above explanation: cp sel amounts now to cp file1 file2 .

from clifm.

deathtrip avatar deathtrip commented on May 23, 2024 1

Thanks for the quick fix! I think the new behavior is better and less confusing. So i'm gonna close this one.

from clifm.

leo-arch avatar leo-arch commented on May 23, 2024

Hi @deathtrip, thanks for reporting.

Here's the thing:

Unlike c and m, cp and mv are external commands, and as such, they have no added functionality: they take what you throw at them. In this case, sel is actually expanded, but that's all. So the complete command is: cp file1 file2. As you can guess, this command copies file1 into file2 (the same with mv).

Why are c and m different? Whenever you pass sel as the last parameter, these internal commands add an extra final parameter: ., so that the complete command reads as follows: c file1 file2 ., which means: copy both files into the current directory.

Now, you're right in that in might be confusing having these two different behaviors. It would be better indeed to have the c/m behavior for cp/mv as well. I'll take a look at it.

from clifm.

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.