wting / autojump

A cd command that learns - easily navigate directories from the command line
Other
16.06k stars 702 forks source link

Subject: Issue with `autojump` in Windows Terminal using Ubuntu WSL and Zsh #686

Closed darylshy closed 9 months ago

darylshy commented 9 months ago

Hello autojump team,

I hope this message finds you well. I've encountered an unusual behavior when using autojump in a specific environment, and I'd appreciate your assistance in resolving it.

Environment:

System Info:


Issue Description: After successfully installing autojump and integrating it with Zsh using the provided instructions, I noticed that every time I use the j command to jump to a directory, the terminal appears to be waiting for more input. Typing additional commands does not yield any results or output. The terminal essentially becomes unresponsive, and I can only regain control by pressing Ctrl+C.

This behavior is unique to the j command. I can execute other commands in the terminal without any issues. However, once I use j to jump to a directory, I encounter the described behavior until I kill the terminal session.


Steps Taken to Troubleshoot:

  1. I've verified that the autojump integration lines in my .zshrc file are correct.
  2. I've tried sourcing the autojump.sh script directly from /usr/share/autojump/autojump.sh, as per the Debian README, but the issue remains.
  3. Restarted terminal sessions multiple times and verified other terminal functionalities.
  4. Sought guidance and troubleshooting steps online and from knowledgeable sources.

.zshrc Contents:

export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="robbyrussell"
plugins=(git autojump)
source $ZSH/oh-my-zsh.sh
# [[ -s /home/dshy/.autojump/etc/profile.d/autojump.sh ]] && source /home/dshy/.autojump/etc/profile.d/autojump.sh
# autoload -U compinit && compinit -u
. /usr/share/autojump/autojump.sh

I'd be grateful for any guidance on how to resolve this issue. If there are any additional details or logs you'd like me to provide, please let me know.

Thank you for your time and assistance!

Best regards, Daryl


Screen Capture

https://github.com/wting/autojump/assets/5904383/518b09ef-c347-4949-b4a0-e9ec48030d9e

darylshy commented 9 months ago

I'm closing this issue. Upon further troubleshooting I made a crucial discovery. The folder that I was j'ing into is located at /mnt/c/path_to_folder.

I get this exact same behavior if I cd into it directly.

I think what's going on is given that I am accessing the c:/ through mnt may be the issue. It's not unusual for odd behaviors to occur when working directly in the Windows file system from within WSL, especially given the different ways Windows and Linux handle file permissions, symbolic links, and other file system operations.

So with that, I'll go ahead and close this.

Thanks anyways :-)