Sunday, 15 April 2012

command prompt - ZSH variable substitution in adam explanation -


I examined R TFM but could not understand it. The snippet is from <2> ZSH from Adam 2 prompt.

  local prompt_line_1a_width = $ {# $ {(%%) prompt_line_1a // (\% ([KF1] |) \ {* \} | \% [BBKF])}} < / Code>  

I understand that the variable length is assigned to a local variable prompt_line_1a variable variable

  $ {(S% %) Prompt_line_1a // (\% ([KF1] |) \ {* \} | \% [BBKF])}   

< / Div>

"post-text" itemprop = "text">

So, someone told me that I just have to look at the right place, there are two parts in the command: < Pre> $ {(flags) variablename}

and

  $ {string // pattern / replacement}   

Where

  • complete signal expansion (extension on the resulting word too) < / Ul>

    and for later / replacements can be removed if there is no replacement but should be outdated.

  • No comments:

    Post a Comment