Coder Social home page Coder Social logo

pond's Introduction

🔑 gpg   🔑 age   💬 keybase   🌍 web   📧 email


"My imagination requires a judicious rein; I am afraid to let it loose, for it carries me sometimes into appalling places beyond the stars and beneath the world." — Algernon Blackwood.

pond's People

Contributors

dependabot[bot] avatar marcransome avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pond's Issues

Support auto-reloading of ponds

The edit command allows interactive edits to a pond but the changes are not reflected in the current shell session if the pond is enabled. This should be a simple case of calling the __pond_load_operation function after edits are made.

There may be consequences to calling source on the environment variables file again in the context of a single shell session, for example where variables are set dynamically, or are not expected to change for the duration of the shell.

Implement ability to load/unload ponds

The enable and disable commands ensure pond variables are made available to the shell environment for new shell sessions only. The ability to load and unload pond variables into the current shell session is required. This will require re-sourcing a pond variables file whenever the file changes (i.e. via the var/variable subcommand's set and rm operations).

Fix markdown-links workflow

The markdown-links workflow does not appear to detect any Markdown files under /github/workspace, meaning no files are checked and the workflow job always succeeds.

Reinstate status command tests

Tests for the status command were removed as part of release 2.0.0 due to significant changes made to the output produced by this command. New tests should be introduced to cover the functionality of this command.

Add pond function support

Having the ability to add functions to ponds would introduce an additional level of functionality.

Such a feature would need to leverage autoloading, likely in the form of modifications to $fish_function_path when load or unload are used, or modifications via pond's initialisation function for enable or disable respectively.

Care should be taken to handle scenarios where function names clash, possibly by validating this upfront when either adding a function to an already enabled pond or when attempting to load or enable one.

Add list command options tests

There are currently limited tests for list command options, and both --enabled and --disabled options should be incorporated into the current test suite.

Improve unload command variable parsing

The regular expression used to match variable names—primarily used by the unload command—does not correctly match against all possible expressions of set. This should be extended to accommodate the following:

  • Mixed short and long options
  • Order independent options
  • Any leading, trailing, or inline whitespace

Variable scope should also be considered when attempting to determine what variables to unset.

Additional test cases should be added to cover a variety of scenarios and ensure the widest possible coverage.

Use consistent fish shell version for workflows and devcontainer

Currently the devcontainer image and workflows use different versions of fish shell, which can be problematic when developing new features and writing unit tests, particularly when adopting new features such as the path builtin introduced in version 3.5.0. To alleviate these issues, the same version should be adopted and indicated in the project README.md file as a minimum requirement for the software.

Improve status command output

Is your feature request related to a problem? Please describe.

The status command could be improved to provide output that better distinguishes between status descriptions and their values—potentially using text padding or alignment—as well as to provide additional detail such as the size, loaded state, and presence of any init or deinit functions.

Describe the solution you'd like

The following examples include proposed solutions for both the global status output and pond status respectively. In both cases a suitable UTF bullet point character (coloured green/red) could be used to indicate:

  • overall health (i.e. functions across all ponds are syntactically valid) for the global status output (i.e. pond status)
  • whether a pond is loaded or not in the case of a named pond (i.e. pond status abc)

Proposed global status output:

● pond <version-or-sha>
    Health: good (functions syntax checked)
     Ponds: 2 (0 enabled; 2 loaded)
 Functions: 1
    Loaded: /home/nobody/.config/fish/pond
            ├─• abc
            └─• xyz

Proposed output for a named pond (i.e. pond status abc):

● abc (/home/nobody/.config/fish/pond/abc)
    Loaded: loaded (fish_function_path)
   Enabled: disabled (pond_function_path)
    Syntax: good
      Init: yes
    Deinit: no
 Functions: 1
      Size: 8.0K

Add test coverage for pond command

Test coverage required for pond command:

Pond management:
       pond create  <name>  Create a new pond
       pond remove  <name>  Remove a pond and associated configuration
       pond list            List all ponds
       pond show            Show all pond files

Add additional list filter options

Is your feature request related to a problem? Please describe.

The list command should support filtering of ponds by loaded state in additional to enabled state.

Describe the solution you'd like

The following options should be added to the list command:

  • -l|--loaded - include loaded ponds in command output (i.e. pond path present in $fish_function_path)
  • -u|--unloaded - include unloaded ponds in command output (i.e. pond path absent from $fish_function_path)

Completions should be updated for both short and long variant options.

Additional context

The list command is currently limited to -e|--enabled and -d|--disabled options and assumes both in the absence of any option.

Reduce job duplication in workflow

The three install-* jobs in the tests workflow share common logic that could be collapsed into a single job using a build matrix:

  • Remove the three install-* jobs
  • Add a single install job that uses the fish-shop/install-plugin action and a build matrix input value for the plugin-manager input name for this action

Implement variable command

Implement variable (v|var) command for variable management:

Variable management:
       pond var set     <pond> <var> <value>  Set pond variable to value
       pond var get     <pond> [var]          Get all pond variables or one if name provided
       pond var remove  <pond> <var>          Remove pond variable

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.