0rax / fishline

A powerline prompt framework for the fish-shell built in fish-shell.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to have just a single line?

RobbieTheWagner opened this issue · comments

Powerline has just a single line, with all the info before where you type, rather than having a newline with an arrow where you type. How can I replicate that here?

Hey @rwwagner90, you can customize your prompt the way you like by updating your fish_prompt and call fishline with the segments you need.

For example if you want the same configuration as the default without the arrow and newline, just set your fish_prompt to

function fish_prompt
    fishline -s $status vimode sigstatus jobs pwd git write
end

You can check the list of available segments by running fishline -x as well as test each of them via fishline -s 0 $segment-name. Once you know which ones you want just update your prompt function to use them :) You dont have to use the default, configure it as you want !

Thanks @0rax! I was looking through the segments trying to determine how to accomplish this and could not figure it out. Which of them was causing the newline? Is the arrow one just always on a newline?

Hey, its the n segment, based in the '\n' symbol, it really just adds a newline in the middle of other segments.

It acts in the same way as the space segment, by just adding this specific character between / after your segments (mostly used as the last segment to have a space between the last closing "real" segment and your cursor).

The arrow segment is just a simple arrow (), while the root segment shows an arrow when you are running it as a user and an infinity symbol () when running as root.