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

有帮助吗?

解决方案

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.

其他提示

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

scutil --set HostName "here"
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top