Giter Club home page Giter Club logo

bash-core's People

Contributors

hyperupcall avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

bash-core's Issues

`v1.0.0` Checklist

With v1.0.0 coming around the corner, there are a few tasks required

  • Remove deprecated functions

    • core.init()
    • core.stacktrace_print()
    • etc.
  • Deprecate error handling functions

  • Remove error handling functions

  • Determine if functions like should_output_color and get_package_info should live here. It seems the should be somewhere else (like bash-utils)

    • Yes, such functions have been deprecated here and moved to bash-std

Error Stacktrace

You could add something like an Errstacktrace

On of my projects.
(https://github.com/yoctu/yosh/blob/master/lib/cli.sh#L60)

It would look like this
/home/dzove855/yosh2/lib/marco.sh: line 4: tik: command not found Error in /home/dzove855/yosh2/lib/marco.sh:4. 'tik' exited with status 127 Call tree: 1: /home/dzove855/yosh2/lib/cli.sh:8 Marco::run(...) 2: yosh2/bin/yosh-runner.sh:78 Cli::router(...) Exiting with status 1

And then you just need to trap ERR so the stackstrace qwill always be call'd when an error happens.

Pass exit code properly

This entails creating a first function for codes that require it (or all of them for consistency) and adding a global variable with $?, since $? will get clobbered

Think about errors / warnings that do not print function name

Errors that aren't operational shouldn't have the function name shown in the error output. New functions should be made for those - or as options to existing ones

  • Remove function names from core.print_* (Code in ~/.dots depends on this)

  • Operational errors should be printed with core.panic(). (if dying is not intended maybe there should be a --no-exit flag

  • A die function should also be defined

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.