.bashrc (line 9): Unsupported use of '='. In fish, please use 'set PS1 "[\[email protected]\h \W]\$ "'

When I try to source ~/.bashrc i get the following error:

.bashrc (line 9): Unsupported use of '='. In fish, please use 'set PS1 "[\[email protected]\h \W]\$ "'.
from sourcing file .bashrc
source: Error while reading file “.bashrc” 

My bashrc file:

# 
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
PS1="[\[email protected]\h \W]\$ "



#Setup Script Edits
alias python=python3
export JAVA_HOME=/opt/jdk-15.0.1
export PATH=${PATH}:${JAVA_HOME}/bin

We do not use bash as default in any editions
We use fish in dr460nized edition
And
We use zsh in all other editions

fish config is located at
~/.config/fish/

Zsh config is located at
~/.zshrc

To use bash as default shell you can do this

chsh -s /bin/bash

Reboot

6 Likes

I suppose you followed a guide. The majority of guides are assuming you use bash shell. You may want to modify the instructions to fish shell.
Since using fish, you have to read about it.

Or you may change to bash shell.

3 Likes

I use Konsole. How do I know what is running? Bash, Fish, or what.

gary

2 Likes

type neofetch, it shows the one used with a pleasent Garuda logo :blush::yum:

2 Likes

Check

echo $SHELL
4 Likes

Shell is basically any way to interact with the operating system. (It can be GUI like a desktop environment and command line interface). Fish, bash etc are all command line shells. In this case, zsh, bash and fish each have different customizability and they also can have different features. Most of the commands on linux among these shells are shared. mostly it's the way the command line looks and interacts(example autocomplete and it can also give suggestions).

1 Like

Also ps will show you what is running in the current terminal window, e.g.

$ ps
    PID TTY          TIME CMD
  13172 pts/4    00:00:01 zsh
  87368 pts/4    00:00:00 ps
6 Likes

just simple :wink:

echo "${0##*/}" | sed 's/\(.\)/\u\1/'
1 Like

Hello,

is there a way to make bash syntax work in fish?
I downloaded bass, but wondering if there is a 100% way to keep writing in fish like in bash?

Welcome :slight_smile:

Please do not post in old topics.
BTW, this forum is for Garuda Linux. :slight_smile:
Tip

3 Likes