lukesampson / pshazz

Give your powershell some pizazz.
The Unlicense
577 stars 40 forks source link

Documentation for themes #55

Closed tobiastimm closed 6 years ago

tobiastimm commented 7 years ago

Is there any documentation how a theme is structured and what Vars are available?

I don't know the parameters for an entry in the prompt section:

  "prompt": [
   [ "cyan",  "", "$path" ],
   [ "red",   "", "$git_lbracket$git_branch$git_dirty$git_rbracket" ],
   [ "red",   "", "$hg_lbracket$hg_branch$hg_bookmark$hg_dirty$hg_rbracket" ],
   [ "green", "", "`n$([char]0x3BB)$([char]0x0BB)" ]
   ],
lukesampson commented 7 years ago

Sorry, there isn't really any documentation. The theme file defines plugins and prompt, and then each plugin can read further settings from the theme file.

Each sub array in "prompt" is [ "foreground-color", "background-color", "string to output" ]. These get written out sequentially.

The common variables like $path are here, and plugins can add their own prompt variables in the global:pshazz:[plugin-name]:prompt function, e.g. for git you can see the var names added, and you can see how some of these can be overridden in the theme JSON here.

lukesampson commented 7 years ago

The wiki page here might be of help.

tobiastimm commented 7 years ago

Ah thx 👍 I've missed this wiki page completly