It’s not my default shell, just my terminal shell. Ain’t got nothing to worry about.
And only one of my two terminals at that. The other use bash.
It’s not my default shell, just my terminal shell. Ain’t got nothing to worry about.
And only one of my two terminals at that. The other use bash.
None of those things worked for me after it. No more fishing for me.
Not sure we’re on the same page here. Did you switch your default shell to fish? Like the one you would see in a TTY?
I launch my main terminal with -e fish
. But if I were to enter a TTY, I’d get bash. Looking at the guide on how to switch your default shell (along with the warnings I saw), it looked too complicated, so I just went the terminal route. In other words, the safe route.
I don’t remember anymore at this point. It was probably like 4+ years ago now. But nothing worked. It was the only time I’ve ever needed time shift. Maybe I did, or tried. That’s definitely possible… I just followed the instructions on their website or GitHub at the time, and that did me in. I’m sure they fixed whatever it is by now though.
I’m just giving warning, it can be a tricky one. No more fish for me,I stick to nice boring bash. I definitely wouldn’t set it as default.
Just here how I do things. My default shell is bash
. For quite some time I invoked fish
(could be zsh
of course as well) in ~/.bashrc
like this
if shopt -q login_shell; then
[ -x /bin/fish ] && SHELL=/usr/bin/fish exec fish
In the meantime I just told the terminal I use to invoke fish
. In my case wezterm
. If I login via TTY I just type fish
.
If this does the same as terminalName -e fish
, then it is wasted time for me in terms of setting it up.
But I noticed that it says “login_shell”: that’s the thing I avoided and maybe this is what I saw that looked complicated. Don’t remember though.
Would you mind clarifying the intent behind this? This says that you will replace bash
with fish
if bash
is started as a login shell. Since this is inside your .bashrc
, it will only work if you include a line to source .bashrc
inside your .bash_profile
, in other words something like this inside your .bash_profile
:
[ -f ~/.bashrc ] && . ~/.bashrc
Is that the case for you?
Assuming that it is (and .bashrc
will be sourced every time you start a bash
login shell), but I’m having trouble coming up with a use case for this. So when you log in from the tty, the shell will be replaced with fish
? What if you need to execute a shell script or run a command non-interactively with bash --login
? Something like:
$ bash --login -c 'some_command'
This will fail because bash
will be replaced by fish
before the command can even run.
As said I had it in the past. Now I am contend with setting it up in the terminal I use.
In my ~/.bash_profile
I have
#
# ~/.bash_profile
#
[[ -f ~/.profile ]] && . ~/.profile
[[ -f ~/.bashrc ]] && . ~/.bashrc
I have to admit that I never had (or wanted) to use bash --login...
Thanks for clarifying.
Yeah. That makes sense now. Otherwise, the command wouldn’t have run.
Yes, I saw that. I was just wondering about the use case you had at the time.
It looks nice i dit not look closer yet , but is there comand like --purge-all-cache ?
If so its nice replacement for my update.sh i create in every system so i dont need to think how to do every think on overy distribution i have applied on some device.
The ugliest os update in rpi with bullsey
(I cant go to bookworm - can compile tvheadend 4.2 on it and 4.3 cant catch all dvb-c in my country )
Sudo apt update
Sudp apt upgrade
Sudo apt autoremove -y
Sudo apt clean
PRUNE_MODULES=1 sudo rpi-update
Eos is nicer but …
Sudo pacman -Syu
yay -Syu
yay -Scc
Yeh i know that yay can doo everithing but like that is easier to watch not to compile .
Thanx. I made a alias for it so timeshift takes a snap before , so if someting goes wrong, just restore from snap.
os_up() {
sudo timeshift --create --comments "Snapshot före systemuppdatering" && sudo eos-update
}
Notes about the script above:
eos-update
can be executed without explicit sudo
, it asks the privileges when needed.$(date +%y%m%d-%H%M)
Thanx, good input:) Time and date automatic shows in TimeShift.
Btw, it is good to install auto-snap for TimeShift to, it hooks into pacman, so every time you do pacman -Yuo it will take a snap.