Coder Social home page Coder Social logo

Comments (2)

erichs avatar erichs commented on September 13, 2024 1

Hi! Thanks for your interest in the project @mrazick and @5c0tt-b0t !

Actually, yes! I've verified that the presence of the hard-coded cite command on line 526 is cruft from a very early version of the script. It's not needed anymore. I'd welcome a PR to remove it!

EDIT: @mrazick: The reason that cite is hard-coded on line 526 in the write() function is to support an edge case using custom metadata. Imagine a user does:

myfunc() {
  cite candy
  candy twizzlers
}

This function depends on the presence of the cite function in the execution context myfunc resides in. The purpose of the write() function is to make it easier to transition from your shell to a written bash script. As it stands, if cite were not present on line 526, the output of the write command would be a script that would cause command not found: cite and command not found: candy errors if myfunc were invoked. By hard-coding this, we're saying it's better to have cite and not need it, than to need it and not have it. It's a bit of a trade-off.

@5c0tt-b0t: I'm not sure I follow what "if" statement you're referring to?

from composure.

nerd190 avatar nerd190 commented on September 13, 2024

Ok, just tested and it indeed fixes that problem! thanks @mrazick 👍
I was wondering if you knew (or better yet, the man himself @erichs)
whether this "if" statement at the top is neccessary?

for f in about author example group param version
do
  eval "$f() { :; }"
done
unset f

This also seems to be part of the actual composure.sh file,
Just wondering if this was needed (as it already in the composure script we have sourced) or in fact a bug???
Once I know, I can look into the script further and attempt to fix this if needed.
THANK YOU! @erichs Composure is amazing!!!

from composure.

Related Issues (18)

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.