Git Product home page Git Product logo

lmorg / murex Goto Github PK

View Code? Open in Web Editor NEW
1.4K 16.0 28.0 45.35 MB

A smarter shell and scripting environment with advanced features designed for usability, safety and productivity (eg smarter DevOps tooling)

Home Page: https://murex.rocks

License: GNU General Public License v2.0

Go 98.60% Shell 0.19% HTML 0.47% CSS 0.32% TypeScript 0.31% SCSS 0.11%
repl shell language murex go terminal tmux bash fish zsh

murex's Introduction

Murex: A Smarter Shell

Version Murex Tests Deploy Docs

Murex is a shell, like bash / zsh / fish / etc however Murex supports improved features and an enhanced UX.

A non-exhaustive list features would include:

  • Support for additional type information in pipelines, which can be used for complex data formats like JSON or tables. Meaning all of your existing UNIX tools to work more intelligently and without any additional configuration.

  • Usability improvements such as in-line spell checking, context sensitive hint text that details a commands behavior before you hit return, and auto-parsing man pages for auto-completions on commands that don't have auto- completions already defined.

  • Smarter handling of errors and debugging tools. For example try/catch blocks, line numbers included in error messages, STDOUT highlighted in red and script testing and debugging frameworks baked into the language itself.

Language Guides

  • Read the language tour to get started.

  • The Rosetta Stone is a great cheatsheet for those wishing to skip the tutorials and jump straight in. This guide includes comparisons with Bash.

  • The Interactive Shell guide walks you through using Murex as a command line as opposed to a scripting language.

Examples

Smart data:

Inline spellchecking:

Autocomplete:

Preview screen:

Useful error messages:

Plus More!

Check out the Language Tour and Interactive Shell guides!

Install instructions

See INSTALL for details.

Discuss Murex

Discussions presently happen in Github discussions.

Compatibility Commitment

Murex is committed to backwards compatibility. While we do want to continue to grow and improve the shell, this will not come at the expense of long term usability. Read more

Known bugs / TODO

Murex is considered stable, however if you do run into problems then please raise them on the project's issue tracker: https://github.com/lmorg/murex/issues


This document was generated from gen/root/README_doc.yaml.

murex's People

Contributors

dependabot[bot] avatar dflock avatar herbygillot avatar johschmitz avatar laurence-flwls avatar lmorg avatar orefalo avatar shalokshalom avatar testwill avatar tiymat 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

murex's Issues

Variable scoping

  • make current variables local scoping
  • local function and alias for set
  • New global function will be for global vars (like how set currently is)

Review merging methods into pipes & removing the hard coded type definitions for builtins

Originally commands in murex where treated as pseudo-objects where each command could support generic returns or have a defined list of methods that could be chained. This is where the -> pipe arose from. However after implementing the POV based around that design it was becoming apparent to me that this might create an artificially steep learning curve where new users would struggle to differentiate between which commands where UNIX processes designed to pass data via anonymous pipes, and which were murex methods (particularly while the interactive shell was still missing the IDE-like context-sensitive autocomplete which I eventually have planned). Treating commands as objects also complicated things for users wanting to alias commands or create functions, as they would then need extra syntax to specify the object they're creating.

So in an effort to simplify the shell the traditional anonymous pipes, command | command, now set the IsMethod flag that was once reserved only for method pipes, ->, and all the compile time type checks for methods has been removed. This has the result of merging the behavior of | and -> while still retaining the distinction in the parser.

The reason I've wanted to retain the distinction in the parser is because I'm still not yet 100% decided on which approach I want to take. One the one hand I would like to make my shell more context aware but equally I don't want that to affect usability (like how Powershell feels awkward to use for those familiar with Bash).

My current workaround is to pass typed information as a parameter in the pipe (while not part of the pipe stream itself). This has the advantage that non-murex-based processes will work transparently but it also means that any murex commands invoked outside of the shell (eg text: example.json -> ./murex-script.mx -> murex-buildins...) cannot pass its return types back to the shell either - relying on the user to cast it manually (text: example.json -> ./murex-script.mx -> cast: json -> murex-builtins...).

Since all of the above are a pretty core implementation detail, I really need to decide which approach I'm taking. This is where I'm open to suggestions. :)

Fix the `try` run modes

In the process of adding new try run modes I have broken try itself. This will need to be fixed

Tidy up `config` command usage

  • Allow more parameters in config get to drill down the config at different levels
  • JSON values in config should be expanded as objects rather than strings

Syntax change: `pipe`, `event`, `runtime`, `config`

Currently there isn't much uniformity between the different configuration tools:

proposed:

  • pipe:
    pipe --flag condition name (create pipe)
    !pipe name (close pipe)
    pipe --list (list pipes)

  • event:
    event --eventtype trigger name { block } (create event)
    !event --eventtype name (close event)
    event --list (list events)

  • runtime:
    runtime --option --option --option (display runtime options)

  • config: (spec subject to change as currently not in line with other styles)
    config set app key value (change config)
    config get app key (get config)
    config define app key { json } (define new config options)
    !config app key (reset to default)
    config (list all config options)

Write new readline API

The existing one isn't really fit for purpose. But this is a massive job.

Requirements:

  • Support returns from commands that don't terminate with a CR/LF
  • Support existing autocomplete framework (this shouldn't be too difficult)
  • Support colourisation
  • Support vim commands
  • Support history (shouldn't be hard as I'm currently bypassing most of the existing readline history functionality
  • Support multiline (shouldn't be hard as I'm currently bypassing most of the existing readline history functionality
  • Support handling control characters (eg ^C)

`config` scoping

To avoid race conditions with multiple murex processes changing config state

Autocomplete flag: SplitPaths

When set, if the autocomplete list is full paths (eg root/branch/branch) then dynamically strip branches from autocomplete

Go's CSV parser is too strict

It's far too strict for dealing with the wide ranging types of tabulated data from the command line.

I will write my own relaxed parser.

Refactor project layout: mutable and runtime values

The idea being you only then need to know two management commands to query the state of murex:

  • config: settings inside murex which can be altered
  • runtime: state of murex which is either defined at compile time, or the state at runtime.

Potentially runtime can be forked from the immutable config?

I'm not sold on the names of these commands either.

exiting murex from parent bash requires reseting

The first time I loaded ./murex, I ran ls then exit
When returned to bash, no text would appear on prompt. I had to run reset
Might be an issue with pty dependency - I haven't looked into it much further than that yet.

Related project: Extraterm

Hello,

I saw your comments on hacker News and found your side project here. You might be interested to know that I'm also working on a project related to improving life inside the shell. It's a terminal called Extraterm which aims to expand on the traditional idea of the terminal emulator with richer data display, better handling of text (more like a text editor at times) and also a much tighter integration with the shell. The main site is here: http://extraterm.org/ Don't forget to read the Features page and the from and show commands which allow for reuse of previous data as input to shell commands.

I see that you are experimenting with piping different data types like JSON and CSV between commands instead of just plain text/bytes. Adding direct support to Extraterm to display tabular data or tree structured data isn't outside the scope of my project.

I encourage you to brainstorm up a list of features, crazy or otherwise, that you would like to see supported on the terminal side. I can't promise anything, but I plan to make Extraterm extensible with a plugin system in the future. Having some kind of a wishlist from you would serve as great input to the design of this plugin system. I would love to see a modern shell which took advantage of a modern updated terminal.

cheers, Simon http://extraterm.org/

`less` / `more` not working

I don't think this issue is related to PTYs but I will need to do more research on the issue but in the meantime if anyone has any insights as to how terminal pagers work then I would welcome the feedback.

Interactive shell auto-completion is unreliable

History et al work as expected but the readline package I'm using only supports prefix matching for autocompletion.

I have a nasty feeling I may need to fork the readline package or even create my own one.

Finish and refactor `open` code and it's extended features

The idea of open was that it was configurable to support any file type. Although the core functionality is already included as part of the default build, the wider side of this feature is still unfinished and the code isn't pretty. This will need doing at some point.

Review `text` command

This has been superseded by open.

Places that will need refactoring:

  • Documentation on GitHub
  • Regression tests
  • Go code (specifically the builtins)

Feature: support inlining other languages

This is an experimental idea but basically a feature where you can inline Bash / Go / whatever. Some code has already been laid down for this but really it should be given a lower priority over other features. Just an interesting challenge from an engineering perspective

Sessionable shell history

The history writer is just a stdio interface so add a config option to alter the history endpoint.

No support for background jobs

I'm tempted to support this via a fork builtin rather than bash's method of using an ampersand suffix (bash's method gets very annoying when dealing with query strings in URLs).

Feature: range

Like grep but for ranges:

Syntax:

range --after regex --before regex

Rewrite readline drawing functions

I've progressed the readline API significantly since it's first inception and added quite a few new features. However they have in turn introduced a few rendering bugs.

The plan is to rewrite the rendering functions to 1) fix those initial bugs and 2) allow the API to be expanded more in the future without the trial-and-error debugging sessions I've often needed up until now.

Allow export and !export to support stdin

  • export (stdin & no args): stdin: VARIABLE=value
  • export variable (stdin & 1 arg): stdin value
  • !export (stdin & no args): stdin: VARIABLE or VARIABLE=value
  • !export (stdin & args): fail because mixed mode

Fix variable scoping

The old code is still there and is salvagable. So hopefully it shouldn't be a massive task

Carridge returns on interactive shell

Review what can have embedded cartridge returns:

  • '\n'?
  • "\n"?
  • { \n }?

Also How they get concatenated (eg via line1 + \s + line2 or line1 + \n + line2

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.