You are here :  Home
    Print this page...

The 2 last notes

iconweb/icons8-legolas-96.pngElvish (2)  -  by alainderen

My computer is under Ubuntu 24.10, the last version available.

I installed VirtualBox, with the last version available in the repo is 7.0.20, even 7.0.22 or 7.1.4 exist.
By default the "Extension Pack" is not installed.

I download the file here:
https://www.virtualbox.org/wiki/Download_Old_Builds

And when I tried to install the file manually in VirtualBox, I had an error "shell problem", because the shell I used ("Elvish") is not present in file "/etc/shells".
VirtualBox was explicit to the cause of the problem.

As "root" I edit the file, and add the line "/usr/local/bin/elvish" at the end of the file.

I retry, and it's working...
The "Extension Pack" is there now.


In add, this entry in the file solved another problem I had.
In nautilus/gnome-shell, it's possible to open a shell with the right-click and "open in terminal" and to open it directly in the selected directory.
But, after I switch to "elvish", the directory was always my "home" directory.
I didn't found a solution by searching on internet.

Now, by adding the entry in "/etc/shells", The command open my Elvish shell session directly in the directory !


Fantastic ! 2 problems solved in one operation.
 

Read more...

Published on 30/10/2024 : 22:48  - 1 comment -   |     |
iconweb/icons8-legolas-96.pngElvish  -  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
 

Read more...

Published on 27/09/2024 : 17:50  - none comment -   |     |