Git Product home page Git Product logo

Comments (3)

rcaloras avatar rcaloras commented on July 24, 2024

When/where are you sourcing the script? If it's just being executed bash-preexec's functions will not have any effect on your global state of your bash session. The sourcing of the containing file also should be towards the end of you bashrc/bash_profile.

from bash-preexec.

philastrophist avatar philastrophist commented on July 24, 2024

I don't want bash-preexec to have an effect on the global state, I just want it to be used whilst the script is running. My use-case is that I want any git commands used within the script to echo their signature to stdout before running. That's what the preexec function does

from bash-preexec.

rcaloras avatar rcaloras commented on July 24, 2024

@philastrophist this behavior is unsupported by bash-preexec. I'm not positive if the debug trap, how bash allows a preexec function, even can work this way in an executed script. I'd suggest either echo-ing the specific commands in the script itself since you're writing it, or I believe there's other ways to setup the script to echo all commands.

Thanks for opening and checking out bash-preexec. Hope you can create the functionality you're trying to achieve.

from bash-preexec.

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.