linux:zsh

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
linux:zsh [2023/09/23 01:34] – [デフォルト シェルの変更] ともやんlinux:zsh [2024/04/24 12:11] (現在) – [Fedoly ZSH Theme (Ubunly カスタム Fedora theme 😅)] ともやん
行 1: 行 1:
 ====== Z shell(Zsh) ====== ====== Z shell(Zsh) ======
-<WRAP zoomimg w400 x1_3>+<WRAP zoomimg w500 x1_2>
 {{:linux:z_shell_001.png|Z Shell 001}} {{:linux:z_shell_001.png|Z Shell 001}}
 </WRAP> </WRAP>
行 542: 行 542:
 </WRAP> </WRAP>
  
-<WRAP left round tip 80%>+<WRAP group><WRAP left tip 90%>
 <html><code>chsh</code></html> コマンドが見つからない場合🤔\\ <html><code>chsh</code></html> コマンドが見つからない場合🤔\\
 +
 <WRAP color_term> <WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
行 566: 行 567:
  
 </pre></html></WRAP> </pre></html></WRAP>
 +</WRAP>
 +
 +<WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
 <b class=GRN>$</b> <b class=HIY>sudo dnf</b> install util-linux-user <b class=GRN>$</b> <b class=HIY>sudo dnf</b> install util-linux-user
行 605: 行 609:
 </pre></html></WRAP> </pre></html></WRAP>
 </WRAP> </WRAP>
 +
 +</WRAP></WRAP><!--end left,group-->
  
 ===== テーマ ===== ===== テーマ =====
 +**Oh My Zsh テーマギャラリー**\\
 +[[git>ohmyzsh/ohmyzsh/wiki/Themes|Themes · ohmyzsh/ohmyzsh Wiki]] [[gtr>https://github.com/ohmyzsh/ohmyzsh/wiki/Themes|翻訳]]\\
  
 ==== Ubunly ZSH Theme ==== ==== Ubunly ZSH Theme ====
行 614: 行 622:
 <WRAP color_term> <WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
-<b class=GRN>$</b> <b class=HIY>mkdir</b> ~/work && <b class=HIY>cd</b> ~/work+<b class=GRN>$</b> <b class=HIY>mkdir</b> ~/work &amp;&amp; <b class=HIY>cd</b> ~/work
 <b class=GRN>$</b> <b class=HIY>git</b> clone --depth 1 https://github.com/alejandromume/ubunly-zsh-theme.git <b class=GRN>$</b> <b class=HIY>git</b> clone --depth 1 https://github.com/alejandromume/ubunly-zsh-theme.git
 </pre></html></WRAP> </pre></html></WRAP>
行 680: 行 688:
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
 <b class=GRN>$</b> <b class=HIY>.</b> ~/.zshrc <b class=GRN>$</b> <b class=HIY>.</b> ~/.zshrc
-<div class=BSc><b class=DKO>┌──(<b class="BOLD ORR">tomoyan  WICKED-BEAT</b>)-[</b>~/work/ubunly-zsh-theme<b style="color: darkorange">]</b> +<span class=BSc><b class=DKO>┌──(<b class="BOLD ORR">tomoyan  WICKED-BEAT</b>)-[</b>~/work/ubunly-zsh-theme<b style="color: darkorange">]</b> 
-<b class=DKO>└─</b><b class=ORR>$</b> </div></pre></html>+<b class=DKO>└─</b><b class=ORR>$</b> </span></pre> 
 +</html></WRAP>
 </WRAP> </WRAP>
 +
 +==== Fedoly ZSH Theme (Ubunly カスタム Fedora theme 😅) ====
 +ubunly.zsh-theme をコピーして fedoly.zsh-theme に修正する...🤔\\
 +<WRAP color_term>
 +<WRAP color_command><html><pre>
 +<font color="#0087FF"><b>$</b></font> <font color="#26A269">cp</font><font color="#FF9999"> </font><font color="#FF9999"><u style="text-decoration-style:single">~/.oh-my-zsh/custom/themes/ubunly.zsh-theme</u></font><font color="#FF9999"> </font><font color="#FF9999"><u style="text-decoration-style:single">~/.oh-my-zsh/custom/themes/fedoly.zsh-theme</u></font>
 +<font color="#0087FF"><b>$</b></font> <font color="#26A269">nano</font> <u style="text-decoration-style:single">~/.oh-my-zsh/custom/themes/fedoly.zsh-theme</u>
 +<font color="#0087FF"><b>$</b></font> <font color="#26A269">diff</font> <font color="#A347BA">-u</font> <u style="text-decoration-style:single">~/.oh-my-zsh/custom/themes/ubunly.zsh-theme</u> <u style="text-decoration-style:single">~/.oh-my-zsh/custom/themes/fedoly.zsh-theme</u> <font color="#12488B"><b>|</b></font> <font color="#26A269">bat</font> <font color="#A347BA">--style</font> changes <font color="#A347BA">-l</font> diff
 +</pre></html></WRAP>
 +<WRAP color_result><html><pre class=Bat>
 +  <font color="#75715E">--- /home/tomoyan/.oh-my-zsh/custom/themes/ubunly.zsh-theme 2023-07-05 04:40:11.485903200 +0900</font>
 +  <font color="#75715E">+++ /home/tomoyan/.oh-my-zsh/custom/themes/fedoly.zsh-theme 2024-04-21 16:36:59.088333447 +0900</font>
 +  <font color="#3BC0F0">@@ -77,7 +77,7 @@</font>
 +  <font color="#F8F8F2"> fi</font>
 +  <font color="#F8F8F2"> </font>
 +  <font color="#F8F8F2"> if [ &quot;$color_prompt&quot; = yes ]; then</font>
 +  <font color="#F92672">   PROMPT=$&apos;%F{%(#.blue.214)}┌──${debian_chroot:+($debian_chroot)──}(%B%F{%(#.red.202)}%n%(#.💀.  )%m%b%F</font>
 +  <font color="#F92672">{%(#.orange.214)})-[%B%F{reset}%(6~.%-1~/…/%4~.%5~)%b%F{%(#.blue.214)}]\n└─%B%(#.%F{red}#.%F{208}$)%b%F{rese</font>
 +  <font color="#F92672">t} &apos;</font>
 +  <font color="#A6E22E">   PROMPT=$&apos;%F{%(#.057.051)}┌──${debian_chroot:+($debian_chroot)──}(%B%F{%(#.red.033)}%n%(#. 💀 .   )%m%b</font>
 +  <font color="#A6E22E">%F{%(#.057.051)})-[%B%F{reset}%(6~.%-1~/…/%4~.%5~)%b%F{%(#.057.051)}]\n└─%B%(#.%F{red}#.%F{033}⚡)%b%F{reset</font>
 +  <font color="#A6E22E">} &apos;</font>
 +  <font color="#F8F8F2">     RPROMPT=$&apos;%(?.. %? %F{red}%B⨯%b%F{reset})%(1j. %j %F{yellow}%B⚙%b%F{reset}.)&apos;</font>
 +  <font color="#F8F8F2"> </font>
 +  <font color="#F8F8F2">     # enable syntax-highlighting</font>
 +</pre></html></WRAP>
 +</WRAP>
 +
 +テーマを ZSH_THEME="fedoly" に変更する🤔\\
 +<WRAP color_term>
 +<WRAP color_command><html><pre>
 +<font color="#0087FF"><b>$</b></font> <font color="#26A269">nano</font> <u style="text-decoration-style:single">~/.z</u><font color="#999999"><u style="text-decoration-style:single">shrc</u></font>
 +</pre></html></WRAP>
 +<WRAP color_result><html><pre>
 +<font color="#2AA1B3"># Set name of the theme to load --- if set to </font><font color="#A2734C"><b>&quot;random&quot;</b></font><font color="#2AA1B3">, it will</font>
 +<font color="#2AA1B3"># load a random theme each time oh-my-zsh is loaded, in which case,</font>
 +<font color="#2AA1B3"># to know which specific one was loaded, run: echo $RANDOM_THEME</font>
 +<font color="#2AA1B3"># See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes</font>
 +<font color="#2AA1B3">#ZSH_THEME=</font><font color="#A2734C"><b>&quot;robbyrussell&quot;</b></font>
 +ZSH_THEME<font color="#26A269">=</font><font color="#A2734C"><b>&quot;fedoly&quot;</b></font>
 +</pre></html></WRAP>
 +</WRAP>
 +
 +zsh の設定を反映させる😉\\
 +<WRAP color_term>
 +<WRAP color_command><html><pre>
 +<font color="#0087FF"><b>$</b></font> <font color="#26A269">.</font> <font color="#999999"><u style="text-decoration-style:single">~/.zshrc</u></font>
 +</pre></html></WRAP>
 +<WRAP color_result><html><pre class=BSc>
 +<font color="#00FFFF">┌──(</font><font color="#0087FF"><b>tomoyan   WICKED-BEAT</b></font><font color="#00FFFF">)-[</font><b>~</b><font color="#00FFFF">]</font>
 +<font color="#00FFFF">└─</font><font style="font-family: monospace; line-height: 1.2em;">⚡</font></pre> </html></WRAP>
 +<WRAP color_result><html><pre class=BSc>
 +<font color="#5F00FF">┌──(</font><font color="#C01C28"><b>root 💀 WICKED-BEAT</b></font><font color="#5F00FF">)-[</font><b>~</b><font color="#5F00FF">]</font>
 +<font color="#5F00FF">└─</font><font color="#C01C28"><b>#</b></font></pre></html></WRAP>
 +</WRAP>
 +{{ :linux:zsh:fedoly.zsh-theme |}}\\
 +<WRAP color_term>
 +<WRAP color_command><html><pre>
 +<font color="#FF8700"><b>$</b></font> <font color="#26A269">curl</font> <font color="#A347BA">-L</font> https://www.tomoyan.net/_media/linux/zsh/fedoly.zsh-theme <font color="#A347BA">-o</font> ~/.oh-my-zsh/custom/fedoly.zsh-theme
 +<font color="#FF8700"><b>$</b></font> <font color="#26A269">nano</font> <u style="text-decoration-style:single">~/.zshrc</u>
 +<font color="#FF8700"><b>$</b></font> <font color="#26A269">.</font> <u style="text-decoration-style:single">~/.zshrc</u>
 +</pre></html></WRAP>
 +</WRAP>
 +
 +=== OS ロゴの検索 ===
 +<WRAP color_term>
 +<WRAP color_command><html><pre>
 +<font color="#0087FF"><b>$</b></font> <font color="#26A269"><u style="text-decoration-style:single">sudo</u></font> <font color="#26A269">dnf</font> install <font color="#A347BA">-y</font><font color="#999999"> gucharmap</font>
 +</pre></html></WRAP>
 +</WRAP>
 +
 +<WRAP zoomimg w400 x1_2>
 +{{:linux:gucharmap_001.png|gucharmap}}
 +</WRAP>
 +
 +=== Xterm 256color chart ===
 +[[https://commons.wikimedia.org/wiki/File:Xterm_256color_chart.svg|File:xterm 256color chart.svg - Wikimedia Commons]]\\
 +<WRAP photo_area_long>
 +{{:linux:xterm_256color_chart.svg|Xterm_256color_chart.svg}}
 +</WRAP>
 +
 +=== 参考 ===
 +参考: [[https://unix.stackexchange.com/questions/124407/what-color-codes-can-i-use-in-my-bash-ps1-prompt/124409#124409|What color codes can I use in my Bash PS1 prompt? - Unix & Linux Stack Exchange]] [[gtr>https://unix.stackexchange.com/questions/124407/what-color-codes-can-i-use-in-my-bash-ps1-prompt/124409|翻訳]]\\
 +   [[so>questions/689765/how-can-i-change-the-color-of-my-prompt-in-zsh-different-from-normal-text|How can I change the color of my prompt in zsh (different from normal text)? - Stack Overflow]] [[gtr>https://stackoverflow.com/questions/689765/how-can-i-change-the-color-of-my-prompt-in-zsh-different-from-normal-text|翻訳]]\\
 +
 +==== Dietly ZSH Theme (Ubunly カスタム DietPi theme 😅) ====
 +ubunly.zsh-theme をコピーして dietly.zsh-theme に修正する...🤔\\
 +<WRAP color_term>
 +<WRAP color_command><html><pre>
 +<font color="#0087FF"><b>$</b></font> <font color="#26A269">cp</font><font color="#FF9999"> </font><font color="#FF9999"><u style="text-decoration-style:single">~/.oh-my-zsh/custom/themes/ubunly.zsh-theme</u></font><font color="#FF9999"> </font><font color="#FF9999"><u style="text-decoration-style:single">~/.oh-my-zsh/custom/themes/dietly.zsh-theme</u></font>
 +<font color="#0087FF"><b>$</b></font> <font color="#26A269">nano</font> <u style="text-decoration-style:single">~/.oh-my-zsh/custom/themes/dietly.zsh-theme</u>
 +<font color="#0087FF"><b>$</b></font> <font color="#26A269">diff</font> <font color="#A347BA">-u</font> <u style="text-decoration-style:single">~/.oh-my-zsh/custom/themes/ubunly.zsh-theme</u> <u style="text-decoration-style:single">~/.oh-my-zsh/custom/themes/dietly.zsh-theme</u> <font color="#12488B"><b>|</b></font> <font color="#26A269">bat</font> <font color="#A347BA">--style</font> changes <font color="#A347BA">-l</font> diff
 +</pre></html></WRAP>
 +<WRAP color_result><html><pre class=Bat>
 +  <font color="#6C6C6C">--- /home/dietpi/.oh-my-zsh/custom/themes/ubunly.zsh-theme  2023-08-08 04:19:56.183862288 +0900</font>
 +  <font color="#6C6C6C">+++ /home/dietpi/.oh-my-zsh/custom/themes/dietly.zsh-theme  2024-04-22 06:34:35.501186304 +0900</font>
 +  <font color="#5FAFFF">@@ -77,7 +77,7 @@</font>
 +  <font color="#FFFFFF"> fi</font>
 +  <font color="#FFFFFF"> </font>
 +  <font color="#FFFFFF"> if [ &quot;$color_prompt&quot; = yes ]; then</font>
 +  <font color="#FF5F5F">   PROMPT=$&apos;%F{%(#.blue.214)}┌──${debian_chroot:+($debian_chroot)──}(%B%F{%(#.red.202)}%n%(#.💀.  )%m%b%F</font>
 +  <font color="#FF5F5F">{%(#.orange.214)})-[%B%F{reset}%(6~.%-1~/…/%4~.%5~)%b%F{%(#.blue.214)}]\n└─%B%(#.%F{red}#.%F{208}$)%b%F{rese</font>
 +  <font color="#FF5F5F">t} &apos;</font>
 +  <font color="#AFD75F">   PROMPT=$&apos;%F{%(#.blue.156)}┌──${debian_chroot:+($debian_chroot)──}(%B%F{%(#.red.154)}%n%(#. 💀 .  )%m%b</font>
 +  <font color="#AFD75F">%F{%(#.orange.156)})-[%B%F{reset}%(6~.%-1~/…/%4~.%5~)%b%F{%(#.blue.156)}]\n└─%B%(#.%F{red}#.%F{154}$)%b%F{re</font>
 +  <font color="#AFD75F">set} &apos;</font>
 +  <font color="#FFFFFF">     RPROMPT=$&apos;%(?.. %? %F{red}%B⨯%b%F{reset})%(1j. %j %F{yellow}%B⚙%b%F{reset}.)&apos;</font>
 +  <font color="#FFFFFF"> </font>
 +  <font color="#FFFFFF">     # enable syntax-highlighting</font>
 +</pre></html></WRAP>
 +</WRAP>
 +
 +テーマを ZSH_THEME="dietly" に変更する🤔\\
 +<WRAP color_term>
 +<WRAP color_command><html><pre>
 +<font color="#0087FF"><b>$</b></font> <font color="#26A269">nano</font> <u style="text-decoration-style:single">~/.z</u><font color="#999999"><u style="text-decoration-style:single">shrc</u></font>
 +</pre></html></WRAP>
 +<WRAP color_result><html><pre>
 +<font color="#2AA1B3"># Set name of the theme to load --- if set to </font><font color="#A2734C"><b>&quot;random&quot;</b></font><font color="#2AA1B3">, it will</font>
 +<font color="#2AA1B3"># load a random theme each time oh-my-zsh is loaded, in which case,</font>
 +<font color="#2AA1B3"># to know which specific one was loaded, run: echo $RANDOM_THEME</font>
 +<font color="#2AA1B3"># See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes</font>
 +<font color="#2AA1B3">#ZSH_THEME=</font><font color="#A2734C"><b>&quot;robbyrussell&quot;</b></font>
 +ZSH_THEME<font color="#26A269">=</font><font color="#A2734C"><b>&quot;dietly&quot;</b></font>
 +</pre></html></WRAP>
 +</WRAP>
 +
 +zsh の設定を反映させる😉\\
 +<WRAP color_term>
 +<WRAP color_command><html><pre>
 +<font color="#0087FF"><b>$</b></font> <font color="#26A269">.</font> <font color="#999999"><u style="text-decoration-style:single">~/.zshrc</u></font>
 +</pre></html></WRAP>
 +<WRAP color_result><html><pre class=BSc>
 +<font color="#AFFF87">┌──(</font><font color="#AFFF00"><b>dietpi  dietpi-001</b></font><font color="#AFFF87">)-[</font><b>~</b><font color="#AFFF87">]</font>
 +<font color="#AFFF87">└─</font><font color="#AFFF00"><b>$</b></font></pre> </html></WRAP>
 +<WRAP color_result><html><pre class=BSc>
 +<font color="#12488B">┌──(</font><font color="#C01C28"><b>root 💀 dietpi-001</b></font>)-[<b>~</b><font color="#12488B">]</font>
 +<font color="#12488B">└─</font><font color="#C01C28"><b>#</b></font></pre></html></WRAP>
 </WRAP> </WRAP>
  
行 690: 行 837:
 [[https://kanasys.com/tech/803|bashとzshの違い。bashからの乗り換えで気をつけるべき16の事柄]]\\ [[https://kanasys.com/tech/803|bashとzshの違い。bashからの乗り換えで気をつけるべき16の事柄]]\\
 [[https://apple.stackexchange.com/questions/388622/zsh-zprofile-zshrc-zlogin-what-goes-where|macos - ZSH: .zprofile, .zshrc, .zlogin - What goes where? - Ask Different]] [[gtr>https://apple.stackexchange.com/questions/388622/zsh-zprofile-zshrc-zlogin-what-goes-where|翻訳]]\\ [[https://apple.stackexchange.com/questions/388622/zsh-zprofile-zshrc-zlogin-what-goes-where|macos - ZSH: .zprofile, .zshrc, .zlogin - What goes where? - Ask Different]] [[gtr>https://apple.stackexchange.com/questions/388622/zsh-zprofile-zshrc-zlogin-what-goes-where|翻訳]]\\
 +[[https://unix.stackexchange.com/questions/655096/what-zsh-theme-does-kali-use|terminal - What ZSH theme does Kali use? - Unix & Linux Stack Exchange]] [[gtr>https://unix.stackexchange.com/questions/655096/what-zsh-theme-does-kali-use|翻訳]]\\
 +[[git>zsh-users/zsh-completions/issues/680|zsh compinit: insecure directories and files on macos catalina when using sudo · Issue #680 · zsh-users/zsh-completions]] [[gtr>https://github.com/zsh-users/zsh-completions/issues/680|翻訳]]\\
 +[[https://unix.stackexchange.com/questions/339954/zsh-command-not-found-compinstall-compinit-compdef|autocomplete - zsh: command not found: {compinstall,compinit,compdef} - Unix & Linux Stack Exchange]] [[gtr>https://unix.stackexchange.com/questions/339954/zsh-command-not-found-compinstall-compinit-compdef|翻訳]]\\
  
 ==== 付録 ==== ==== 付録 ====
  • linux/zsh.1695400480.txt.gz
  • 最終更新: 2023/09/23 01:34
  • by ともやん