Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problems with cd on sshfs mounted directory with git repositories #531

Open
laurapoggio-sptools opened this issue Feb 21, 2024 · 2 comments

Comments

@laurapoggio-sptools
Copy link

I am testing oh-my-bash. Great tool.
I tried to cd into a git repository in a folder mounted via sshfs. The console hanged. It is working without problems is I do not use oh-my-bash

I found this issue.

Especially this comment and the following one.

Any recommended solutions (beside running git config oh-my-bash.hide-status 1 in each subdirectory)?

@akinomyoga
Copy link
Contributor

akinomyoga commented Feb 21, 2024

There is currently no recommended general solution.

If you are fine without git status at all, maybe you can configure it globally: git config --global bash-it.hide-status 1.

Or you can overwrite the shell function _omb_prompt_git with something like the following, (though I haven't tested it):

# bashrc (after source "$OSH"/oh-my-bash.sh)

function _omb_prompt_git {
  local fstype=$(df -T . | awk '{T=$2}END{print $2}')
  [[ $fstype == fuse.sshfs ]] && return 1
  command git "$@"
}

@laurapoggio-sptools
Copy link
Author

Setting the git config works.

I like the idea of the function, but I have not been able to make it work. I will test with the hide-status and see if it gives any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants