powerline integration for prompt PS1, variable $o#3294
powerline integration for prompt PS1, variable $o#3294viklequick wants to merge 6 commits intoelfmz:masterfrom
Conversation
|
1 I think its better to make optional |
Looks like it is already optional, to use it you need to specify proper prompt ($o instead of standard $p) to let it work. Perhaps you mean the additional guard checkbox might be necessary? Если надо, я могу добавить еще опцию. Так-то оно пока руками не настроишь -- не будет использовать...
I've tried it with no luck. In many cases it returned me empty line. Maybe I've used it wrongly, but I've found only few usages and it seems it needs an specific context. So, as I just needed two ascii codes (256 color setup and rgb color setup) I've created it as separate code. Я пробовал использовать, но оно как-то странно работало - возвращало мне пустую строку вместо текста. Вероятно, я неверно использовал. Поскольку же все что мне было надо, так это вытащить команду установки цвета, то я нарисовал этот кусочек отдельно. Надо было распарсить только два esc кода (для палитры в 256 цветов и для RGB). |
powerline integration for prompt PS1, variable $o
and prompt becomes fancy and modern:
Technically, powerline is a daemon that works in userspace and listens commands on unix socket. So, it is really cheap to connect to int and ask for colorful command line (left part). Depending on the theme and config, powerline is able to show branches, jobs etc.