You are here :   Home » Blog » Elvish
    Print this page...

Blog - Elvish

 3 members
Connected : (nobody)

Elvish  -  by alainderen

[Pour les lecteurs français, cliquez sur le drapeau en haut à gauche pour basculer sur la page en français]


I discovered recently the new shell named "Elvish".
Sounds nice.

https://elv.sh/

1) Installation :

The stable version at this moment is 0.21.0, but check on the site to get the latest release...

curl -so - https://dl.elv.sh/linux-amd64/elvish-v0.21.0.tar.gz | sudo tar -xzvC /usr/local/bin


2) Setup as default shell :

sudo usermod -s /usr/local/bin/elvish <username>
cat /etc/passwd | grep <username>


And after reconnect with your user, the default shell is now in place.


3) Functions :

If you are familiar with bash, ksh, or sh, it sounds similar.

In bash, I use frequently the "ll" command.
On different unix with no bash, I create an alias to define it as "ls -al".

It's a quite bit different on elvish.
No alias but functions.

fn ll {|@args|
    ls -al $@args
}



4) RC file :

https://elv.sh/ref/command.html#rc-file

"RC file" is the equivalent of "~/.bash_profile" for bash, or "~/.profile" for ksh.

mkdir -p ~/.config/elvish/
vi ~/.config/elvish/rc.elv


Inside I put the function I defined previously, and each time, I start a terminal, my "ll" is ready tu use !


5) Next :

I will continue to explore it.
I'am going to translate some of my shell scripts in Elvish.

The "peach" ("parallel each") command looks like powerful.


6) References:

The documentation seems to be complete and clear.
https://elv.sh/learn/
https://elv.sh/learn/tour.html
https://elv.sh/ref/
https://elv.sh/ref/command.html


Forum:
Not a lot of threads for the moment.
https://bbs.elv.sh/



Icon of this page found here:
https://icons8.com/icons/set/elvish
 

Published on 27/09/2024 : 17:50   | |    |


Comments

Nobody gave a comment yet.
Be the first to do so!