Thanks for this - a great powerline like shell implementation, especially given the support for tcsh, which I'm currently forced into at work. (the standard powerline not working with tcsh as far as I know )
Anyway - I noted that there was no newline support for tcsh. Please see below my attempt at getting it to work. It seems to now (at least for me!). Note the space before \\n and also the double \\ I've no idea why this works but after playing around for a bit it does appear to. Any education on why this is the case would be great. Anyway, hope this is useful. Rob
# powerline_shell/segments/newline.py
from ..utils import BasicSegment, warn
class Segment(BasicSegment):
def add_to_powerline(self):
if self.powerline.args.shell == "tcsh":
self.powerline.append(" \\n",
self.powerline.theme.RESET,
self.powerline.theme.RESET,
separator="")
else:
self.powerline.append("\n",
self.powerline.theme.RESET,
self.powerline.theme.RESET,
separator="")
Hi,
Thanks for this - a great powerline like shell implementation, especially given the support for tcsh, which I'm currently forced into at work. (the standard powerline not working with tcsh as far as I know )
Anyway - I noted that there was no newline support for tcsh. Please see below my attempt at getting it to work. It seems to now (at least for me!). Note the space before
\\n
and also the double\\
I've no idea why this works but after playing around for a bit it does appear to. Any education on why this is the case would be great. Anyway, hope this is useful. Rob