waveterm icon indicating copy to clipboard operation
waveterm copied to clipboard

cd does not change directory

Open Hamatti opened this issue 1 year ago • 18 comments

Describe the bug Running cd [folder] does not do anything.

To Reproduce Steps to reproduce the behavior:

  1. run cd folder/
  2. [nothing happens]

(see screenshot below)

Expected behavior It should change to [folder].

Screenshots waveterm-bug-cd

Desktop (please complete the following information):

  • OS: MacOS
  • Version: v0.5.1 (20231205-174934)

Hamatti avatar Dec 18 '23 20:12 Hamatti

Thanks for submitting. This is a really strange bug. Not sure why it is coming up for you -- obviously cd works when we do our internal testing, and I haven't seen this happening to anyone else (note that #163 is a different issue).

Not sure where to start. Do you have anything unusual in your .bashrc or .bash_profile files? I'm thinking specifically of something that might cause an exit trap to fire? We use an exit trap to read the new directory after a command like cd, and if you have one already it might be causing some strange behavior. If it isn't that, anything else unusual in your dotfiles would be really helpful to see (if you don't mind sharing).

sawka avatar Dec 19 '23 07:12 sawka

Hie,

I've the same behaviour. I've commented some line in my dotfiles (.bashrc, .bash_profile) and saved. After that i was able to work with cd ...

And after uncomment my lines and touch / reload waveterm it's working yet... hum...

# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"

Juste resaved this dotfiles has to be work again... 😄

geoffroycochard avatar Dec 19 '23 10:12 geoffroycochard

Do you have anything unusual in your .bashrc or .bash_profile files?

I don't. I tried by removing both .bashrc and .zshrc files temporarily, restarted Waveterm, created a new tab and nothing changed. I assume this means it's not related but if there's some sort of cache I need to clear to make sure, let me know how to do that and I can double check.

It's really interesting because so far it's the only command that I've noticed that wouldn't work. Everything else has been spot on.

If it helps, I can share my .zshrc and .bashrc files but would prefer to do that privately.

Hamatti avatar Dec 19 '23 17:12 Hamatti

Hie,

I've the same behaviour. I've commented some line in my dotfiles (.bashrc, .bash_profile) and saved. After that i was able to work with cd ...

And after uncomment my lines and touch / reload waveterm it's working yet... hum...

# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"

Juste resaved this dotfiles has to be work again... 😄

this worked temporarily on a single workspace

geoffroycochard avatar Dec 20 '23 09:12 geoffroycochard

Same issue here. I also tried removing my .bash_profile but still couldn't cd into another directory.

chrislatimer avatar Dec 21 '23 02:12 chrislatimer

I've to comment this line in my ~/.bash_profile and force restart wave, and it seems working again...

image

Strange behavior...

geoffroycochard avatar Dec 21 '23 07:12 geoffroycochard

I have just tried out Waveterm for the first time and I am also experiencing the same "cd" issue described above.

Waveterm seems to be really nice but the "cd" issue really is a showstopper.

I run Ubuntu 23.04.

amorando10 avatar Jan 08 '24 07:01 amorando10

With version 0.5.3, I now get an error when trying to cd:

bash: /Users/juhis/.mshell/rcfiles/bcce4410-8846-4b6e-b93d-d4e2465b446c: line 6843: syntax error: unexpected end of file

So something related has changed, maybe this gives you more help @sawka

Hamatti avatar Jan 08 '24 14:01 Hamatti

Okay, I have a lead on this bug. I think it might be related to the EXIT trap running multiple times (possibly because of exiting subshells?). Haven't tested it with bash yet, but I ran into a similar issue while working on zsh support so it is possible it is related.

sawka avatar Jan 09 '24 02:01 sawka

Any news on this bug?

I had not touched Waveterm since my last comment as this bug makes it unusable. I have just installed version 0.6.1 but sadly no change

amorando10 avatar Feb 05 '24 09:02 amorando10

Had a similar issue with being unable to cd. I was in a directory, on a mounted external disk '/media//virtual machines/' and ejected the disk. I was then unable to cd out of the directory as the current working directory no longer existed. Expected behavior would be 'cd /' or 'cd ~' would take you to the new directory whether the current directory existed or not. Linux_x64 machine with Client Version v0.6.1 20240131-063952.

blackisle51 avatar Feb 06 '24 10:02 blackisle51

I've had the same problem and as others already suggested commenting the RVM initialization fixed the problem

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

guardiande avatar Apr 06 '24 13:04 guardiande

I hope this extra information helps find the issue:

I'm having a similar problem, but I think mine might be related to #163. In my .bash-aliases I have an alias which runs cd /path/to/dir && nvm use. The command works fine, but does not update the state for the current directory in Wave. Note: I'm running on linux, Wave version 0.7.2.

MrMarCode avatar Apr 19 '24 14:04 MrMarCode

I think this might be fixed as of v0.7.4. There was a similar issue where people's git branch was not updating in the prompt. It had to do with zsh's exittrap not firing for us as expected. I have a feeling the same thing was going on with respect to this "cd" problem as well (that last "nvm" call might have caused the exittrap to not work).

If anyone is still active on this issue, if you install v0.7.4, please let me know if this clears up the bug.

sawka avatar May 02 '24 21:05 sawka

Problem persists with 0.7.5.

guardiande avatar May 10 '24 09:05 guardiande

If anyone is still active on this issue, if you install v0.7.4, please let me know if this clears up the bug.

I updated to Client Version 0.7.5 (20240502-224736) today and cd works for me now!

I'm excited to finally give Wave a proper go. Thank you for the work, hopefully the rest of the bugs around this also get discovered.

Hamatti avatar May 11 '24 14:05 Hamatti

With 0.75 cd still does not work when defined as an alias image

monnetchr avatar May 27 '24 09:05 monnetchr

Just installed on Ubuntu 22 and I thought I was going crazy. cd does not change the directory.

I was questioning what this application is supposed to do...

tayloraleach avatar Sep 18 '24 22:09 tayloraleach