wavetermdev / waveterm

An open-source, cross-platform terminal for seamless workflows
https://www.waveterm.dev
Apache License 2.0
4.31k stars 111 forks source link

[Bug]: .bash_profile not being properly sourced #1015

Open trashyms opened 2 weeks ago

trashyms commented 2 weeks ago

Feature description

Ability to set a script to be executed any time a shell is started.

Implementation Suggestion

No response

Anything else?

No response

esimkowitz commented 2 weeks ago

This is already possible with your shell's RC files, can you elaborate on what you want Wave to do differently?

trashyms commented 2 weeks ago

on macos .bash_profile executed by others terminal softwares

But on wave it is never executed automatically

has to be sourced manually

esimkowitz commented 2 weeks ago

This sounds more like a bug... Will take a look

esimkowitz commented 2 weeks ago

@trashyms just to confirm, if you run echo $SHELL from Wave, what value do you get and is it the same as if you run it from the default Terminal?

Also what version of Wave are you running?

trashyms commented 2 weeks ago

Thanks for the suggestion.

My wave version is version 0.8.11 202410110234

And I do get the same result for echo $SHELL in both termilal default application and in wave interpreter:

   /usr/local/bin/bash

Sometimes new terminal just freeze: impossible to enter any command.

esimkowitz commented 2 weeks ago

What leads you to suspect that your .bash_profile isn't running? Can you try adding an echo statement in your .bash_profile to see if it logs anything to your console?

trashyms commented 1 week ago

What lead me to think that .bash_profile isn't run are:

Thanks in advance for any suggestion.

esimkowitz commented 1 week ago

To confirm, which version of macOS are you on? Did you try adding the echo statement to your .bash_profile to see if it got run at all? I wonder if it's running and then unsetting. Also, is this on your local machine or a remote machine?

trashyms commented 1 week ago

Monterey is the newer MacOS version my machine can execute. I am using MacOS Monterey 12.7.6 (21H1320) on a 15 inches mid-2015 MacBook Pro.

I did add the echo command and it's give me the same result on wave and others terminal applications.

It's running on my local machine.

Seems to be what you suggesting: unsetting before complete shell initaalization.

Because after I run the .bash_profile manualy, everything is working completety normally.