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

does powerline works for csh #2254

Open
gkamendje73 opened this issue Mar 26, 2024 · 4 comments
Open

does powerline works for csh #2254

gkamendje73 opened this issue Mar 26, 2024 · 4 comments

Comments

@gkamendje73
Copy link

I have powerline working with Bash. I was wondering if there is a way to configure powerline to work with CSH. Any pointer to a CSH configuration recipe would be welcome.

@PH111P
Copy link
Member

PH111P commented May 11, 2024

Hi @gkamendje73,

Indeed, there seems to be a powerline binding for tcsh, although the docs don't seem to know about that.

As to how to set that up, first please refer to https://powerline.readthedocs.io/en/latest/usage/shell-prompts.html, then in the relevant configuration file add . {repository_root}/powerline/bindings/tcsh/powerline.tcsh

@gkamendje73
Copy link
Author

In my case, I have powerline 2.8.3 installed in /usr/lib/python3.6/site-packages however the directories like /usr/lib/python3.6/site-packages/powerline/bindings/{bash,tcsh,fish} are all empty.

pip show powerline-status
Name: powerline-status
Version: 2.8.3
Summary: The ultimate statusline/prompt utility.
Home-page: https://github.com/powerline/powerline
Author: Kim Silkebaekken
Author-email: kim.silkebaekken+vim@gmail.com
License: MIT
Location: /usr/lib/python3.6/site-packages
Requires:
Required-by:

However, I do see the file /usr/share/powerline/tcsh/powerline.tcsh so I added source /usr/share/powerline/tcsh/powerline.tcsh in my .cshrc file. But I am not sure that this is the correct way to do it for the following two reasons:

  1. I do see the following error error connecting to /run/tmux/1001/default (No such file or directory)
  2. part of the prompt is garbled when I change directory as depecited in the screenshot below
    image

@PH111P
Copy link
Member

PH111P commented May 12, 2024

Searching the docs for "tcsh" gives the following result, which might be worth a try:

In order to keep shell prompt, but avoid launching Python twice to get unused [above]. (https://powerline.readthedocs.io/en/latest/configuration/reference.html#config-themes-above) lines in tcsh $POWERLINE_NO_TCSH_ABOVE or $POWERLINE_NO_SHELL_ABOVE variable should be set.

Having said that, it could very well be that the tcsh binding got broken in the recent years without anyone noticing; you can try to have a look here https://github.com/powerline/powerline/blob/develop/powerline/bindings/tcsh/powerline.tcsh for an idea of what the binding is trying to do. Unfortunately, I am too busy right now to do some more in-depth digging myself right now, sorry.

@gkamendje73
Copy link
Author

gkamendje73 commented May 12, 2024

I tried
setenv POWERLINE_NO_TCSH_ABOVE 1
as well as
setenv POWERLINE_NO_SHELL_ABOVE
before sourcing powerline.tcsh But none of them worked. I guess I need to dig more into this.
Thanks for the hint anyway.

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

No branches or pull requests

2 participants