I noticed on Ultramarine and RisiOS they run zsh. They seem to have a way of providing predictable commands, perhaps as a built in package or script.
Is there a way to achieve this with BASH.
If not I have currently installed zsh and wondering if anyone has implemented this on gnome terminal. Perhaps there is a neat way to switch between the different shell languages.
Currently I am at this stage
This is the Z Shell configuration function for new users,
zsh-newuser-install.
You are seeing this message because you have no zsh startup files
(the files .zshenv, .zprofile, .zshrc, .zlogin in the directory
~). This function can help you with a few settings that should
make your use of the shell easier.
You can:
(q) Quit and do nothing. The function will be run again next time.
(0) Exit, creating the file ~/.zshrc containing just a comment.
That will prevent this function being run again.
(1) Continue to the main menu.
--- Type one of the keys in parentheses ---
Many of my colleagues used macOS where zsh is the default. I have a short list of customizations I do for every new linux install. One is to change my login shell to zsh using chsh (in a terminal) , then start a new terminal to do the Z Shell configuration function for new users.
As noted, each shell has different features, and completion is usually one of them. Bash has bash-completionâpackages provide completion files that tell bash how to predict the next tokens. Other shells also have this. There are also other customisations but perhaps theyâre beyond the scope of this forum hereâif you search for specific things you want to do, youâll find lots of posts on how to do them.
For zsh, thereâs also this:
(I still use bash so Iâve not used it, but Iâve run into it in lots of places)
None of this is gnome-terminal specific. Thatâs just a terminal emulator. You can run whatever shell you wish in any terminal emulator.
Shell scripts should start with a âshebangâ line (most commonly #! /usr/bin/bash, #! /usr/bin/zsh, or #! /usr/bin/sh now that the legacy /bin/bash etc are just symbolic links to the actual programs in /usr/bin. You can stick with zsh when entering commands directly in a terminal, but write scripts that will run under other shells. For script I like to use dash, a much smaller shell:
% ls -l /usr/bin/dash /usr/bin/bash /usr/bin/zsh
-rwxr-xr-x. 1 root root 1443376 Jan 21 20:00 /usr/bin/bash
-rwxr-xr-x. 1 root root 133168 Aug 1 2023 /usr/bin/dash
-rwxr-xr-x. 1 root root 963944 Jan 16 20:00 /usr/bin/zsh
If you are interested in command-line tools, I recommend Linux Command because it has been around long enough that mistakes have been corrected (and not some AI generated fiction that has become to common). There you will find Other Shells.
Wanna give fish shell a try? (Itâs in the repos). I am using it since many years and absolutely love the autocompletion. It feels as if it reads my mindâŚ
Yes, Iâm not aware of bash having this particular capability. I see this post that refers to something that allows it in bash, but i think it replaces system bash with another built version (so I wouldnt suggest it unless you know what youâre doing in detail)
As also noted, this âsuggestionâ feature is actually from fish, and zsh users can enable it by using things like this:
You canât switch between âdifferent shell languagesâ, but you can just switch shells whenever you want. If youâre in bash and want to use zsh, just type zsh and thatâll start. To switch defaults, use chsh (man chsh for more information, or use your favourite search engine).
this is great thanks @ankursinha . I use a lot of macos unfortunaly so i wanted to try zsh on fedora to see if i can make my workflow faster with itâŚ
BASH is really great though, just wish it had a bit more features.
On bash, you can change your âPS1ââthe isaiah@fedora-office:~$ bit. Iâm assuming it can be done on zsh too. So itâs possible the defaults are just different.
Try echo "$PS1" to see what you get. To see what shell youâre on, I think you can look at the $SHELL environment variable:
Normally $ indicates you are not root, # indicates you are root.
Btw there is a command to change your shell for Gnome Console/Terminal (whatever is the one actually used, GNOMEâŚ) and also a GUI way afaik, you change your default profile to launch /usr/bin/fish for example.
bash with completions should be the easiest, fish has its fancy own syntax that only works in fish, which is annoying, zsh is a mix and very customizable.
In its most basic form, fzf works as a filter, processing text from standard input (stdin), then outputting a matching selection to standard output (stdout). In a way, fzf is similar to grep but it adds features that make it more suitable for interactive searches, including:
Fuzzy finding capabilities allow approximate searches by any part of the match in any order.
Super-fast processing speed
Interactive match selection lets the user select the desired match after initial filtering.
Single- or multi-text selection
File content previews
A comprehensive set of features and customization options
Due to these features, fzf is a fantastic option when youâre searching anything on the terminal, for scripts, and to develop pseudo user interfaces for command-line programs.
When I think about it, I am still in awe that I have access to such a fantastic tool from the open source community. I am grateful that Junegunn Choi and other contributors made it available for others to benefit.
In fairness, zsh is also not fully bash-compliant, either. Itâs just closer than fish. While most very simple bash scripts should work in zsh, not all operations will, and there are also some zsh specific things that wonât work in bash (Such as =() for fd input redirection). Things should mostly work in zsh, but donât be surprised if youâll need to finesse a few things here and there from installer scripts, etc.