Code Monkey home page Code Monkey logo

Comments (2)

GiselleSerate avatar GiselleSerate commented on September 26, 2024

Testing reveals that this is not a problem with the setup file. Echoing and saving $ABSPATH at the beginning of the uninstall script doesn't work for some reason; its value is blank there too. I don't know why this is; it worked fine on bash.

This is something that I can reacquire easily in the uninstall script, but this is a heads up that cds may not be able to use my established global variable in other bits of this repository.

from myaliases.

aryarm avatar aryarm commented on September 26, 2024

I might have an idea for why this is happening.

When we create the $ABSPATH variable, we are making it globally accessible (and editable) by all commands that are run after the terminal has started up. This includes our own commands like cds and whatnot.
But an executed script (like uninstall, for example) may or may not have access to those global variables because we don't know whether it is being executed in the same environment as the one that set those global variables to begin with. This makes most sense when you realize that uninstall is being executed by /bin/sh, not /bin/zsh. This might explain why uninstall worked in a bash environment, since many terminals apparently use /bin/sh as bash.

This is all to say that cds shouldn't be affected, so we don't need to sweat it.

from myaliases.

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.