Skip to content

Commit

Permalink
Site updated: 2024-12-10 00:00:41
Browse files Browse the repository at this point in the history
  • Loading branch information
2-3-5-7 committed Dec 9, 2024
1 parent c8e6e39 commit af285e6
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion category/2. 处理平台/atom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@
<li>.bashrc 文件,中文目录会导致显示出问题,所以用 iconv <figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">if</span> [[ <span class="variable">$TERM</span> == screen* ]]; <span class="keyword">then</span></span><br><span class="line"> PROMPT_COMMAND=<span class="string">'echo -ne "\033k\033\0134\033k[`basename ${PWD} | iconv -f UTF-8 -t ASCII 2>/dev/null`]\033\0134"'</span></span><br><span class="line"><span class="keyword">fi</span></span><br></pre></td></tr></table></figure></li>
</ul>
</li>
<li>zsh,<a href="https://unix.stackexchange.com/questions/28430/screen-status-bar-to-display-current-directory-for-zsh-bash-shell">参考1</a>、<a href="https://stackoverflow.com/questions/45288905/zsh-mystery-variable-expansion">参考2</a> <figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">setopt extendedglob</span><br><span class="line">if [[ $TERM == screen* ]]; then</span><br><span class="line"> precmd () {</span><br><span class="line"> local dir=$(print -Pn "%c")</span><br><span class="line"> print -Pn "\ek$dir\e\\"</span><br><span class="line"> }</span><br><span class="line"> preexec () {</span><br><span class="line"> local dir=$(print -Pn "%c")</span><br><span class="line"> # 截短是为了留空间显示 CMD</span><br><span class="line"> dir=$dir[1,6]</span><br><span class="line"> local CMD=${1[(wr)^(sudo|*=*|-*)]}</span><br><span class="line"> print -Pn "\ek$dir] ${CMD}\e\\"</span><br><span class="line"> }</span><br><span class="line">fi</span><br></pre></td></tr></table></figure>
<li>zsh,<a href="https://unix.stackexchange.com/questions/28430/screen-status-bar-to-display-current-directory-for-zsh-bash-shell">参考1</a>、<a href="https://stackoverflow.com/questions/45288905/zsh-mystery-variable-expansion">参考2</a> <figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">setopt extendedglob</span><br><span class="line">if [[ $TERM == screen* ]]; then</span><br><span class="line"> precmd () {</span><br><span class="line"> local dir=$(print -Pn "%c" | iconv -f UTF-8 -t ASCII 2>/dev/null)</span><br><span class="line"> print -Pn "\ek$dir\e\\"</span><br><span class="line"> }</span><br><span class="line"> preexec () {</span><br><span class="line"> local dir=$(print -Pn "%c" | iconv -f UTF-8 -t ASCII 2>/dev/null)</span><br><span class="line"> # 截短是为了留空间显示 CMD</span><br><span class="line"> dir=$dir[1,6]</span><br><span class="line"> local CMD=${1[(wr)^(sudo|*=*|-*)]}</span><br><span class="line"> print -Pn "\ek$dir] ${CMD}\e\\"</span><br><span class="line"> }</span><br><span class="line">fi</span><br></pre></td></tr></table></figure>
<ul>
<li>相关手册<ul>
<li><a href="https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html#Prompt-Expansion">%c</a></li>
Expand Down
2 changes: 1 addition & 1 deletion category/2. 处理平台/feed.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion category/2. 处理平台/rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@
<li>.bashrc 文件,中文目录会导致显示出问题,所以用 iconv <figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">if</span> [[ <span class="variable">$TERM</span> == screen* ]]; <span class="keyword">then</span></span><br><span class="line"> PROMPT_COMMAND=<span class="string">'echo -ne "\033k\033\0134\033k[`basename ${PWD} | iconv -f UTF-8 -t ASCII 2>/dev/null`]\033\0134"'</span></span><br><span class="line"><span class="keyword">fi</span></span><br></pre></td></tr></table></figure></li>
</ul>
</li>
<li>zsh,<a href="https://unix.stackexchange.com/questions/28430/screen-status-bar-to-display-current-directory-for-zsh-bash-shell">参考1</a>、<a href="https://stackoverflow.com/questions/45288905/zsh-mystery-variable-expansion">参考2</a> <figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">setopt extendedglob</span><br><span class="line">if [[ $TERM == screen* ]]; then</span><br><span class="line"> precmd () {</span><br><span class="line"> local dir=$(print -Pn "%c")</span><br><span class="line"> print -Pn "\ek$dir\e\\"</span><br><span class="line"> }</span><br><span class="line"> preexec () {</span><br><span class="line"> local dir=$(print -Pn "%c")</span><br><span class="line"> # 截短是为了留空间显示 CMD</span><br><span class="line"> dir=$dir[1,6]</span><br><span class="line"> local CMD=${1[(wr)^(sudo|*=*|-*)]}</span><br><span class="line"> print -Pn "\ek$dir] ${CMD}\e\\"</span><br><span class="line"> }</span><br><span class="line">fi</span><br></pre></td></tr></table></figure>
<li>zsh,<a href="https://unix.stackexchange.com/questions/28430/screen-status-bar-to-display-current-directory-for-zsh-bash-shell">参考1</a>、<a href="https://stackoverflow.com/questions/45288905/zsh-mystery-variable-expansion">参考2</a> <figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">setopt extendedglob</span><br><span class="line">if [[ $TERM == screen* ]]; then</span><br><span class="line"> precmd () {</span><br><span class="line"> local dir=$(print -Pn "%c" | iconv -f UTF-8 -t ASCII 2>/dev/null)</span><br><span class="line"> print -Pn "\ek$dir\e\\"</span><br><span class="line"> }</span><br><span class="line"> preexec () {</span><br><span class="line"> local dir=$(print -Pn "%c" | iconv -f UTF-8 -t ASCII 2>/dev/null)</span><br><span class="line"> # 截短是为了留空间显示 CMD</span><br><span class="line"> dir=$dir[1,6]</span><br><span class="line"> local CMD=${1[(wr)^(sudo|*=*|-*)]}</span><br><span class="line"> print -Pn "\ek$dir] ${CMD}\e\\"</span><br><span class="line"> }</span><br><span class="line">fi</span><br></pre></td></tr></table></figure>
<ul>
<li>相关手册<ul>
<li><a href="https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html#Prompt-Expansion">%c</a></li>
Expand Down
2 changes: 1 addition & 1 deletion category/虚拟环境/atom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@
<li>.bashrc 文件,中文目录会导致显示出问题,所以用 iconv <figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">if</span> [[ <span class="variable">$TERM</span> == screen* ]]; <span class="keyword">then</span></span><br><span class="line"> PROMPT_COMMAND=<span class="string">'echo -ne "\033k\033\0134\033k[`basename ${PWD} | iconv -f UTF-8 -t ASCII 2>/dev/null`]\033\0134"'</span></span><br><span class="line"><span class="keyword">fi</span></span><br></pre></td></tr></table></figure></li>
</ul>
</li>
<li>zsh,<a href="https://unix.stackexchange.com/questions/28430/screen-status-bar-to-display-current-directory-for-zsh-bash-shell">参考1</a>、<a href="https://stackoverflow.com/questions/45288905/zsh-mystery-variable-expansion">参考2</a> <figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">setopt extendedglob</span><br><span class="line">if [[ $TERM == screen* ]]; then</span><br><span class="line"> precmd () {</span><br><span class="line"> local dir=$(print -Pn "%c")</span><br><span class="line"> print -Pn "\ek$dir\e\\"</span><br><span class="line"> }</span><br><span class="line"> preexec () {</span><br><span class="line"> local dir=$(print -Pn "%c")</span><br><span class="line"> # 截短是为了留空间显示 CMD</span><br><span class="line"> dir=$dir[1,6]</span><br><span class="line"> local CMD=${1[(wr)^(sudo|*=*|-*)]}</span><br><span class="line"> print -Pn "\ek$dir] ${CMD}\e\\"</span><br><span class="line"> }</span><br><span class="line">fi</span><br></pre></td></tr></table></figure>
<li>zsh,<a href="https://unix.stackexchange.com/questions/28430/screen-status-bar-to-display-current-directory-for-zsh-bash-shell">参考1</a>、<a href="https://stackoverflow.com/questions/45288905/zsh-mystery-variable-expansion">参考2</a> <figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">setopt extendedglob</span><br><span class="line">if [[ $TERM == screen* ]]; then</span><br><span class="line"> precmd () {</span><br><span class="line"> local dir=$(print -Pn "%c" | iconv -f UTF-8 -t ASCII 2>/dev/null)</span><br><span class="line"> print -Pn "\ek$dir\e\\"</span><br><span class="line"> }</span><br><span class="line"> preexec () {</span><br><span class="line"> local dir=$(print -Pn "%c" | iconv -f UTF-8 -t ASCII 2>/dev/null)</span><br><span class="line"> # 截短是为了留空间显示 CMD</span><br><span class="line"> dir=$dir[1,6]</span><br><span class="line"> local CMD=${1[(wr)^(sudo|*=*|-*)]}</span><br><span class="line"> print -Pn "\ek$dir] ${CMD}\e\\"</span><br><span class="line"> }</span><br><span class="line">fi</span><br></pre></td></tr></table></figure>
<ul>
<li>相关手册<ul>
<li><a href="https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html#Prompt-Expansion">%c</a></li>
Expand Down
2 changes: 1 addition & 1 deletion category/虚拟环境/feed.json

Large diffs are not rendered by default.

Loading

0 comments on commit af285e6

Please sign in to comment.