Coder Social home page Coder Social logo

Directory Manipulations about script HOT 5 CLOSED

CSenshi avatar CSenshi commented on August 24, 2024
Directory Manipulations

from script.

Comments (5)

bitfield avatar bitfield commented on August 24, 2024

Thanks for the issue @CSenshi! A couple of very interesting ideas there.

Could you give a short example program showing you would like to use these functions in script, supposing they were provided?

from script.

CSenshi avatar CSenshi commented on August 24, 2024
  1. cd:
    script.ChangeDir("/home/guest") - it would change your working directory to "/home/guest"

  2. pwd:
    script.pwd().stdout() - would print out your current working directory (e.g. after executing above command it would output "/home/guest")

P.S. I haven't yet thought about name of functions, so ChangeDir() and pwd() would do for now

from script.

bitfield avatar bitfield commented on August 24, 2024

But we already have os.Chdir() and os.Getwd(), don't we? What value would this add to that?

from script.

CSenshi avatar CSenshi commented on August 24, 2024

oh okay, I know that they are in os library, I thought you might want it in your script library as well. But as for now I Can see there is no real need for chdir, but pwd would be nice in script library because of pipes. There can be case where someone wants to do some operation on pwd-s output afterwards.

P.S. I would love to contribute to this project, because I think it has potential. I would like to hear If you have any other suggestions.

from script.

bitfield avatar bitfield commented on August 24, 2024

No problem, you're most welcome to contribute, and keep making suggestions! I'll close this for now, but keep the ideas coming.

from script.

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.