Murex – An intuitive and content aware shell for a modern command line

81 pointsposted 9 hours ago
by modinfo

41 Comments

xyproto

3 hours ago

I gave it a spin. First it complained about aspell dictionaries, then I tried installing a package in an effort to improve the prompt from simply saying "murex":

    murex » murex-package install https://github.com/orefalo/murex-module-starship
    \* Getting package from 'https://github.com/orefalo/murex-module-starship'....
    Error in `murex-package` (0,1): protocol handler for HTTPS has not yet been written. Please use git in the mean time (you can do this by specifying a git extension in the uri)
    .murex_modules » murex-package install https://github.com/orefalo/murex-module-starship.git
    \* Getting package from 'https://github.com/orefalo/murex-module-starship.git'....
    Cloning into '/home/aroedset/.murex_modules/murex-module-starship'...
    Error in `murex-package` (0,1): \* Package 'murex-module-starship': Error loading module `starship` in path `/home/aroedset/.murex_modules/murex-module-starship/starship.mx`:
                              >   \* Missing required executable, builtin or murex function: `starship`
    .murex_modules »      

And then the time I allocated for myself for trying out a random shell I found on the internet was up.

nickpinkston

2 hours ago

Upvote just for good historical reference!

Murex were the shells whose excretions were used to make the Tyrian purple of the Mediterranean. Tyrian referring to Tyre, one of the major Phoenician city-states.

It was so iconic that the "Punic Wars" are called that because Punic = Phoenicia = "Purple People".

Carthage was the Phoenician colony that outlasted the home country.

https://en.wikipedia.org/wiki/Tyrian_purple

gausswho

an hour ago

It's a one-eyed, one-horned, flying, purple people eater...

throwaway894345

an hour ago

Also, the Phoenicians were the descendants of the Canaanites, who (according to one etymological theory) are also named after the color purple.

The Phoenicians were a semitic people like the Jews, and they gave the world its first alphabet which was adopted by both the Hebrews and the Greeks. The Greeks added vowels, and the Romans adopted that alphabet and it became roughly the one we use today.

If you go to the Wiki page (https://en.m.wikipedia.org/wiki/Phoenician_alphabet) and scroll down to the Table of Letters header, you can see how the letters evolved from Egyptian hieroglyphs to the letters we use today. It’s particularly interesting to me that our letter “B” (which the greeks called “beta” and which forms the tail end of “alphabet”) was originally a house, and the semitic languages called it “bēt” which was their word for house, which you can still see today in Biblical place names like Bethel (house of God—“El” was a very old name for God).

liampulles

5 hours ago

Because I need the scripts and snippets I write for my repos to work for other developers, I'm going to write them to be bash compatible. That applies also to scripts and snippets written by others that I consume.

So if a shell is not bash syntax compatible, then it really has to offer some astonishingly useful features to offset my having to translate and map the scripts I need to run for it.

Murex does not interpret "$(cmd args)". So unfortunately, I cannot use it. I know it's not fair, and I know that is promoting a lock-in of what shells can do, but I need to get shit done I'm afraid.

moondev

4 hours ago

You should consider putting a shebang at the top of your scripts instead of leaving it to fate

liampulles

4 hours ago

I do this for all the scripts I write. That does cover one of the scenarios I covered above, which is valid.

rafram

4 hours ago

Then there’s no reason you can’t use a different shell as your interactive shell, while running your scripts in bash.

kstrauser

2 hours ago

A thousand times this. I use bash scripting for things I’m going to distribute, but do all my local CLI work and scripting in fish because life’s too short to wear the bash hair shirt when I don’t have to.

esafak

2 hours ago

bash: what you feel like doing with your head trying to get work done in it.

liampulles

4 hours ago

For me to develop my scripts it would help alot if my interactive shell supports the syntax as well. I mean you are right of course, I CAN do that, but it then becomes a tradeoff question again of whether this non-compatible interactive shell has sufficient niceties.

sholladay

2 hours ago

I agree with you. Have you tried Fish? I find it to be the perfect balance of these goals. It has lots of niceties, which for me was already enough to switch to it years ago. But lately, they’ve been adding lots of bash compatibility, which has made it even more awesome.

MangoToupe

4 hours ago

I just write everything in fish and have an LLM translate it to bash. Freed up a couple brain cells for more useful things for sure.

sholladay

2 hours ago

Newer versions of Fish have significantly improved bash compatibility. The LLM may actually be making things harder for you than they need to be.

kstrauser

2 hours ago

The single biggest win there was that it understands ‘export foo=bar’ now, which is probably 90% of what I’d ever copy and paste into a shell.

kitd

7 hours ago

Interesting. Looks similar to nushell [1] which also is data-encoding-aware.

[1] https://www.nushell.sh/

xalava

6 hours ago

Thanks for pointing it out. I've tried both as interactive shells for a few minutes. Murex seems to have a more minimalist approach that works well as a drop-in replacement.

However, I have trouble understanding some design decision, such as inventing redundant keywords. And I've spotted bugs in boths (e.g. ls --literal fails in nu, and the completion proposes it twice in Murex).

esafak

2 hours ago

ls --literal does not exist, that's why. Try man.

wyan

7 hours ago

Wasn't Murex some sort of backend software for financial institutions?

jmcomets

7 hours ago

Still is. It's a French/Lebanese corp based in Paris/Beirut. I worked there for a few years early in my career.

pasc1878

4 hours ago

Not just backend - it replaced the front end system I wrote for FX options (after I left the bank)

mikl

8 hours ago

Maybe I’m just not the target audience, but looking at the front page, I don’t see what actual problems this solves. The claims sound nice, but without examples of what they mean in real world use, it’s not really compelling.

_notreallyme_

8 hours ago

I may be wrong, but it gives me some powershell vibe. Since it seems to be targeted for macOS, I would assume it "solves" the lack of powershell equivalent on Mac ?

roger_

2 hours ago

Agreed.

The nushell homepage, by comparison, immediately conveys the benefits of that project.

oneeyedpigeon

6 hours ago

What happened to the convention that shell names end in sh? There are:

    grep sh$ /usr/share/dict/words | wc -l
        1959
options available; surely we haven't exhausted them all?!

Y_Y

3 hours ago

Balderdash! Sorry to be standoffish, but you must distinguish between dictionaries. My distro has chosen to impoverish me with a nightmarish 315.

(wamerican 2017.08.24-1 from Ubuntu 18.04)

bckr

5 hours ago

This is instead named for an animal with a shell

h33t-l4x0r

8 hours ago

This looks interesting, I will consider switching if it's not sluggish like zsh was that one day I tried it.

iberator

8 hours ago

Back in the 486 era? same here hehe ksh for life :p

esafak

2 hours ago

Has anyone spent good time with murex AND nushell and ultimately chose murex?

BrouteMinou

3 hours ago

It looks like PowerShell, or nushell that also looks like PowerShell.

Did you know you can install PowerShell on Linux too?

ItsHarper

2 hours ago

PowerShell is so much clunkier than nutshell, which is truly a delight. Haven't tried murex.

oguz-ismail

3 hours ago

    $ ./murex-linux-arm64
    Loading profile `.murex_preload`
    SIGSYS: bad system call
    PC=0x18fd0 m=8 sigcode=1
    
    goroutine 498 gp=0x4000283340 m=8 mp=0x4000100808 [syscall]:
    syscall.Syscall6(0x1b7, 0xffffffffffffff9c, 0x40000227e0, 0x1, 0x200, 0x0, 0x0)
            /opt/hostedtoolcache/go/1.24.6/x64/src/syscall/syscall_linux.go:95 +0x2c fp=0x40001119c0 sp=0x4000111960 pc=0xa067c
    syscall.faccessat2(0xffffffffffffff9c, {0x4000359fb0?, 0x4000022780?}, 0x1, 0x200)
            /opt/hostedtoolcache/go/1.24.6/x64/src/syscall/zsyscall_linux_arm64.go:33 +0x84 fp=0x4000111a20 sp=0x40001119c0 pc=0x9df74
    syscall.Faccessat(0xffffffffffffff9c, {0x4000359fb0, 0x27}, 0x1, 0x200)
            /opt/hostedtoolcache/go/1.24.6/x64/src/syscall/syscall_linux.go:171 +0x3c fp=0x4000111b00 sp=0x4000111a20 pc=0x9c9ec
    internal/syscall/unix.Eaccess(...)
    ...
I'm tired boss