Don't understand german? Read or subscribe to my english-only feed.

zsh hacking

*
Today I did some zsh-hacking. I was sick of sourcing special files in my ~/.zsh/ to change my prompt – which is quite essential for me to change between a comfortable prompt for working and one for copy/pasting. So I wrote my own prompt-functions.

Some predefined prompt functions are located in $ZSHDIR/functions/Prompts/. I named my prompts “smart” (the one I usually use by default), “copypaste” (quite simple for easy use with copy/paste) and “heavy” (based on the layout of Matthias Kopfermann[thx!]).

I noticed a quite strange behaviour when you are using the preview of zsh prompt themes. Check it out on your own (pasting output would make no sense and would be quite to much):

$ zsh -f                             # start up zsh without config-files
$ echo $PROMPT                       # print out value of $PROMPT
$ vared fpath                        # edit $fpath if necessary
$ autoload promptinit && promptinit  # now initialise the prompt-feature
$ prompt -p                          # print out preview of available prompts
$ echo $PROMPT                       # print out value of $PROMPT

2 Responses to “zsh hacking”

  1. dhwz Says:

    A general comment on your blog: I don’t know german but i think the link to best of days worst of days belongs in the _german_ blogroll

  2. mika Says:

    Thanks for hint, fixed that.