Code Monkey home page Code Monkey logo

sbo-shell's People

Contributors

jarmuszz avatar

Watchers

 avatar

sbo-shell's Issues

Remake `_tree`

The _tree user function was written fast and needs a rewrite. There's a couple things wrong with it:

  • The -f flag may only be supplied as a first argument.
  • It uses _source_info (which also needs to be separated into two functions) without a subshell which sets the .info variables globally.
  • It has very leaky, argument checking.
  • No proper error handling is implemented, weird errors pop-up.
  • The intern_tree "$REQUIRES" | sort -u | sed 's/\s*//' | awk '!x[$0]++' is not super bad but another function for flat dependency tree should be created.

Split functions into front-end and back-end functions

Currently, some user functions call other user functions which is a really bad practice. Some functions should be split into front-end and back-end parts (like _tree and intern_tree) where front-end function handles arguments and error-checking and calls the back-end function/s.

Split like this will not only improve performance but will also fix bugs and and make debugging easier.

Functions to split:

  • _goto
  • _find
  • _source_info
  • _unset_info
  • And probably others

New functions

New functions to implement:

  • Check whether package is installed
    • Split into front-end and back-end functions
  • Check whether package SBo repository tree is out-of-date
    • Easily doable for github.
    • Maybe automatic .info patching.

Possibly more to come.

Add mechanism preventing loading sbo-shell multiple times, add `_restart`

When sbo-shell starts set some variable, when it ends unset it. At the end of the file check whether the said variable is set or not.

The _restart function will be a lot more tricky - because sbo-shell is suposed to be sourced, the $0 is equal to shell's $0, and ergo, sbo-shell doesn't know it's path.

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.