-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
poetry shell loses terminal lines and columns (stuck at 80x25) #4165
Comments
This might be related to #4121. |
Yes, it does appear to be the same. But it's that the terminal dimensions are lost. 'termcap' is a misnomer in my title, as I jumped through hoops and recreated it with 'terminfo'. And now I'm not sure if it's a 'tty' thing or an 'X11' thing. I'll update my title if I can to be more generic. On a whim, I've tried manually sending the processes in the tree a SIGWINCH to see if I could get it to do something with the X window dimensions side of things. It doesn't die, but it doesn't change anything either. After more exploring, I don't have the issue via
|
I am also experiencing this on FreeBSD 13.1 in alacritty on X11 running bspwm and picom. Any development on this issue in the last year? |
A potential workaround, depending on what you are looking for, might be to activate the environment using a shell function defined in function poetry_activate() {
if [[ -f "pyproject.toml" ]]; then
# check if already in virtualenv
command -v deactivate &> /dev/null && deactivate
poetry_env=$(poetry env info -p)
source "$poetry_env/bin/activate"
fi
} (Partially modified from here: https://github.com/tvaintrob/auto-poetry-env/blob/main/auto-poetry-env.sh) I am wondering whether this issue is somehow related to the fact that we are both running FreeBSD... |
Something I'm experimenting with is only running the That seems to give the necessary shell configs without the resize etc at https://github.com/python-poetry/poetry/blob/c1475a0b6dd6f4a3e99112cc36b8c0d1024e4048/src/poetry/utils/shell.py. That said — am I missing something? Why do we need the python code there? |
Dupe #6351 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I am on the latest Poetry version.
I have searched the issues of this repo and believe that this is not a duplicate.
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option). (n/a)OS version and name: FreeBSD 13.0
Poetry version: 1.1.16
Issue
When running
poetry shell
my terminal is set to 80x25 regardless of window size. This was originally noticed within tmux, but is reproducible in plain konsole and xterm.I'll provide an example from xterm because it's the most "normal".
It causes weird behavior in neovim, less, etc. unless the window is sized to 80x25, which is not ideal.
Manually sourcing the virtualenv does not cause this
And as a side note, with other projects managed by pipenv, this does not occur in
pipenv shell
. Not trying to be inflammatory. I just wanted to note it since it too uses a subshell, but created differently.I'm sorry that I don't have a solution to propose or associated PR, as this defies my limited understanding of termcap. I will attempt further research as I have time, but wanted to file this now.
The text was updated successfully, but these errors were encountered: