Frage

I have been using YADR Yet Another Dotfile Repository to enable a whole bunch of features in vim.

Given that I split my terminal window, I'd like to reclaim some of the screen estate by shortening the command prompt.

Does anyone know how to edit the zsh files to accomodate this, specifically pertaining to a .yadr setup?

Thanks internet

War es hilfreich?

Lösung

You can just set PROMPT (and/or PROMPT2, PROMPT3 and PROMPT4) in a file with the extension .zsh in the directory ~/.zsh.after/, for example ~/.zsh.after/myprompt.zsh:

PROMPT1='myprompt %# '
PROMPT2='> '

Have a look at the sections EXPANSION OF PROMPT SEQUENCES and following in zshmisc(1) for some details on zsh prompts.

Also, have a look at the YADR documentation on themes for more details on how to use premade themes.

Andere Tipps

If you want to just shorten your computer name instead of changing the whole prompt you can issue the command:

scutil --set HostName "here"
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top