This repository was archived by the owner on Feb 28, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 524
This repository was archived by the owner on Feb 28, 2025. It is now read-only.
ZSH Prompt with themes won't work properly under MC #58
Copy link
Copy link
Open
Description
Hi ,
I use oh-my-zsh for theming my prompt and most of the time i use theme 'agnoster'.
my prompt looks like:
echo $PS1
%{%f%b%k%}$(build_prompt)
echo $(build_prompt)
%{%K{black}%}%{%F{default}%} %(!.%{%F{yellow}%}.)%{%{%}%}yflerko%{%{%}%}@%{%{%}%}%m %{%K{blue}%F{black}%}%{%F{white}%} ~ %{%k%F{blue}%}%{%f%}
or inside git repo:
%{%K{black}%}%{%F{default}%} %(!.%{%F{yellow}%}.)%{%{%}%}yflerko%{%{%}%}@%{%{%}%}%m %{%K{blue}%F{black}%}%{%F{white}%} ~/git/md2k/paramiko %{%K{green}%F{blue}%}%{%F{black}%} master %{%k%F{green}%}%{%f%}
without MC everything looks good, and MC when in subshell (by Ctrl+o) also all fine.
But inside MC prompt on startup shown correctly, but if i start switch folders it randomly disappearing.
I tried use dtrace (MacOS) but with it MC always show Prompt properly, so unable to catch what happened when MC wiping prompt.
Below what i can see for prompt realted output:
read(0x3, "\r\033[0m\033[27m\033[24m\033[J\033[39m\033[0m\033[49m\033[40m\033[39m \033[38;5;009myflerko\033[38;5;011m@\033[38;5;014mMD2K-MAC \033[44m\033[30m\356\202\260\033[37m ~/git/eBa\0", 0x80) = 128 0
write(0x1, "\r\033[0m\033[27m\033[24m\033[J\033[39m\033[0m\033[49m\033[40m\033[39m \033[38;5;009myflerko\033[38;5;011m@\033[38;5;014mMD2K-MAC \033[44m\033[30m\356\202\260\033[37m ~/git/eBa\0", 0x80) = 128 0
select(0x7, 0x7FFF59F847E0, 0x0, 0x0, 0x0) = 1 0
read(0x3, "y \033[49m\033[34m\356\202\260\033[39m \033[K\033[?1h\033=\0", 0x80) = 36 0
write(0x1, "y \033[49m\033[34m\356\202\260\033[39m \033[K\033[?1h\033=\0", 0x24) = 36 0
Below how prompt looks if i comment function strip_ctrl_codes
for prompt:
\033[62;3H0m.[27m.[24m.[J.[39m.[0m.[49m.[40m.[39m .[38;5;009myflerko.[38;5;011m@.[38;5;014mMD2K-MAC .[44m.[30m\356\202\260.[37m ~/git .[49m.[34m\356\202\260.[39m .[K.[?1h.=\033[81C\033[62;155H\0
Some info about gcc and others:
mc -V
GNU Midnight Commander 4.8.12
Built with GLib 2.40.0
Using the S-Lang library with terminfo database
With builtin Editor
With subshell support as default
With support for background operations
With mouse support on xterm
With internationalization support
With multiple codepages support
Virtual File Systems: cpiofs, tarfs, sfs, extfs, ftpfs, sftpfs, fish, smbfs
Data types: char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;
gcc --version
Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0
Thread model: posix
S-Lang version: 2.2.4
GLib 2.40.0
Not familiar with C programming , so not sure if i give you enough information.
Metadata
Metadata
Assignees
Labels
No labels