linux:zsh

差分

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

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
linux:zsh [2023/08/12 14:58] – [DietPi (Raspberry Pi Zero WH)] ともやん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?400|Z Shell 001}}+{{:linux:z_shell_001.png|Z Shell 001}}
 </WRAP> </WRAP>
 本家: [[https://www.zsh.org|Zsh - zsh.org]]\\ 本家: [[https://www.zsh.org|Zsh - zsh.org]]\\
行 68: 行 68:
  
 ==== DietPi (Raspberry Pi Zero WH) ==== ==== DietPi (Raspberry Pi Zero WH) ====
 +<WRAP zoomimg w400 x1_5>
 +{{:linux:z_shell_on_dietpi_001.png|Z Shell on DietPi}}
 +</WRAP>
 [[https://dietpi.com/forum/t/how-to-properly-switch-to-zsh-and-be-able-to-use-dietpi-commands/15303/5|How to properly switch to zsh and be able to use dietpi commands - General Discussion - DietPi Community Forum]] [[gtr>https://dietpi.com/forum/t/how-to-properly-switch-to-zsh-and-be-able-to-use-dietpi-commands/15303/5|翻訳]]\\ [[https://dietpi.com/forum/t/how-to-properly-switch-to-zsh-and-be-able-to-use-dietpi-commands/15303/5|How to properly switch to zsh and be able to use dietpi commands - General Discussion - DietPi Community Forum]] [[gtr>https://dietpi.com/forum/t/how-to-properly-switch-to-zsh-and-be-able-to-use-dietpi-commands/15303/5|翻訳]]\\
 DietPi では DietPi 固有のコマンド群が bash でしかサポートされていないが...🤔 無理やり...😅\\ DietPi では DietPi 固有のコマンド群が bash でしかサポートされていないが...🤔 無理やり...😅\\
行 115: 行 118:
 </WRAP> </WRAP>
  
-参考:\\+<accordion id="create_help" collapsed="false"> 
 +===== DietPi の Z shell 対応 ===== 
 +<html><code>~/.zsh_dietpi</code></html> を作成する🤔\\ 
 +<WRAP color_term> 
 +<WRAP color_command><html><pre> 
 +<b class=GRN>$</b> <b class=HIY>nano</b> ~/.zsh_dietpi 
 +</pre></html></WRAP> 
 +<WRAP color_mincode_long><code bash> 
 +# DietPi-Globals: dietpi-* aliases, G_* functions and variables 
 +. /boot/dietpi/func/dietpi-globals || { echo -e '[\e[31mFAILED\e[0m] DietPi-Login | Failed to load DietPi-Globals. Skipping DietPi login scripts...'; return 1; } 
 + 
 +# Aliases 
 +# - sudo alias that allows running other aliases with "sudo": https://github.com/MichaIng/DietPi/issues/424 
 +alias sudo='sudo ' 
 +# - DietPi programs 
 +alias dietpi-letsencrypt='/boot/dietpi/dietpi-letsencrypt' 
 +alias dietpi-autostart='/boot/dietpi/dietpi-autostart' 
 +alias dietpi-cron='/boot/dietpi/dietpi-cron' 
 +alias dietpi-launcher='/boot/dietpi/dietpi-launcher' 
 +alias dietpi-cleaner='/boot/dietpi/dietpi-cleaner' 
 +alias dietpi-morsecode='/boot/dietpi/dietpi-morsecode' 
 +alias dietpi-sync='/boot/dietpi/dietpi-sync' 
 +alias dietpi-backup='/boot/dietpi/dietpi-backup' 
 +alias dietpi-bugreport='/boot/dietpi/dietpi-bugreport' 
 +alias dietpi-services='/boot/dietpi/dietpi-services' 
 +alias dietpi-config='/boot/dietpi/dietpi-config' 
 +alias dietpi-software='/boot/dietpi/dietpi-software' 
 +alias dietpi-update='/boot/dietpi/dietpi-update' 
 +alias dietpi-drive_manager='/boot/dietpi/dietpi-drive_manager' 
 +alias dietpi-logclear='/boot/dietpi/func/dietpi-logclear' 
 +alias dietpi-survey='/boot/dietpi/dietpi-survey' 
 +alias dietpi-explorer='/boot/dietpi/dietpi-explorer' 
 +alias dietpi-banner='/boot/dietpi/func/dietpi-banner' 
 +alias dietpi-justboom='/boot/dietpi/misc/dietpi-justboom' 
 +alias dietpi-led_control='/boot/dietpi/dietpi-led_control' 
 +alias dietpi-wifidb='/boot/dietpi/func/dietpi-wifidb' 
 +alias dietpi-optimal_mtu='/boot/dietpi/func/dietpi-optimal_mtu' 
 +alias dietpi-cloudshell='/boot/dietpi/dietpi-cloudshell' 
 +alias dietpi-nordvpn='G_DIETPI-NOTIFY 1 "DietPi-NordVPN has been renamed to DietPi-VPN. Please use the \"dietpi-vpn\" command."' 
 +alias dietpi-vpn='/boot/dietpi/dietpi-vpn' 
 +alias dietpi-ddns='/boot/dietpi/dietpi-ddns' 
 +alias cpu='/boot/dietpi/dietpi-cpuinfo' 
 +# - Optional DietPi software aliases 
 +[[ -d '/mnt/dietpi_userdata/sonarr' || -d '/mnt/dietpi_userdata/radarr' || -d '/mnt/dietpi_userdata/lidarr' ]] && alias dietpi-arr_to_RAM='/boot/dietpi/misc/dietpi-arr_to_RAM' 
 +command -v kodi > /dev/null && alias startkodi='/boot/dietpi/misc/start_kodi' 
 +[[ -f '/usr/games/opentyrian/run' ]] && alias opentyrian='/usr/games/opentyrian/run' 
 +[[ -f '/mnt/dietpi_userdata/dxx-rebirth/run.sh' ]] && alias dxx-rebirth='/mnt/dietpi_userdata/dxx-rebirth/run.sh' 
 +# - 1337 moments ;) 
 +alias 1337='echo "Indeed, you are =)"' 
 + 
 +# "G_DIETPI-NOFITY -2 message" starts a process animation. If scripts fail to kill the animation, e.g. cancelled by user, terminal bash prompt has to do it as last resort. 
 +[[ $PROMPT_COMMAND == *'dietpi-process.pid'* ]] || PROMPT_COMMAND="[[ -w '/tmp/dietpi-process.pid' ]] && rm -f /tmp/dietpi-process.pid &> /dev/null && echo -ne '\r\e[J'; $PROMPT_COMMAND" 
 + 
 + 
 +# DietPi-Login: First run setup, autostarts and login banner 
 +# - Prevent call if $G_DIETPI_LOGIN has been set. E.g. when shell is called as subshell of G_EXEC or dietpi-login itself, we don't want autostart programs to be launched. 
 +[[ $G_DIETPI_LOGIN ]] || /boot/dietpi/dietpi-login 
 +</code></WRAP> 
 +</WRAP> 
 + 
 +<html><code>~/.zshrc</code></html> から <html><code>~/.zsh_dietpi</code></html> を呼び出すように設定する🤔\\ 
 +<WRAP color_term> 
 +<WRAP color_command><html><pre> 
 +<b class=GRN>$</b> <b class=HIY>nano</b> ~/.zshrc 
 +</pre></html></WRAP> 
 +<WRAP color_mincode><code bash> 
 + 
 +if [ -f ~/.commonshrc ]; then 
 +    . ~/.commonshrc 
 +fi 
 + 
 +# Z shell DietPi Support 
 +. ~/.zsh_dietpi 
 +</code></WRAP> 
 +</WRAP> 
 + 
 +==== 参考 ==== 
 +[[git>MichaIng/DietPi|MichaIng/DietPiLightweight justice for your single-board computer!]]\\ 
 +<panel id="create_reference_panel" type="default" title="+ 参考 そのままでは DietPi の機能でエラーが発生">
 <WRAP color_term> <WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
行 232: 行 313:
 </code></WRAP> </code></WRAP>
 </WRAP> </WRAP>
 +</panel> 
 +</accordion>
  
 ==== Oh My Zsh のインストール ==== ==== Oh My Zsh のインストール ====
行 249: 行 331:
 </pre></html></WRAP> </pre></html></WRAP>
 <WRAP color_result><html><pre> <WRAP color_result><html><pre>
-<b class=BLU>Cloning Oh My Zsh...</b+<span style="color:#13496F">Cloning Oh My Zsh...</span
-remote: Enumerating objects: 1334, done. +remote: Enumerating objects: 1361, done. 
-remote: Counting objects: 100% (1334/1334), done. +remote: Counting objects: 100% (1361/1361), done. 
-remote: Compressing objects: 100% (1288/1288), done. +remote: Compressing objects: 100% (1309/1309), done. 
-remote: Total 1334 (delta 34), reused 1013 (delta 25), pack-reused 0; +remote: Total 1361 (delta 33), reused 1132 (delta 28), pack-reused 0 
-Receiving objects: 100% (1334/1334), 1.99 MiB | 2.59 MiB/s, done. +Receiving objects: 100% (1361/1361), 2.00 MiB | 8.84 MiB/s, done. 
-Resolving deltas: 100% (34/34), done.+Resolving deltas: 100% (33/33), done.
 From https://github.com/ohmyzsh/ohmyzsh From https://github.com/ohmyzsh/ohmyzsh
  * [new branch]      master     -&gt; origin/master  * [new branch]      master     -&gt; origin/master
-branch 'masterset up to track 'origin/master'+branch &apos;master&apos; set up to track &apos;origin/master&apos;
-Already on 'master'+Already on &apos;master&apos;
 /home/tomoyan /home/tomoyan
  
-<b class=BLU>Looking for an existing zsh config...</b+<span style="color:#13496F">Looking for an existing zsh config...</span
-<b class=YEL>Found old .zshrc.pre-oh-my-zsh. </b><b class=GRN>Backing up to /home/tomoyan/.zshrc.pre-oh-my-zsh-2023-05-23_11-56-22</b> +<span style="color:#26A269">Using the Oh My Zsh template file and adding it to /home/tomoyan/.zshrc.</span>
-<b class=YEL>Found /home/tomoyan/.zshrc.</b> <b class=GRN>Backing up to /home/tomoyan/.zshrc.pre-oh-my-zsh</b> +
-<b class=GRN>Using the Oh My Zsh template file and adding it to /home/tomoyan/.zshrc.</b>+
  
-<b class=BLU>Time to change your default shell to zsh:</b+I can&apos;t change your shell automatically because this system does not have chsh. 
-<b class=YEL>Do you want to change your default shell to zsh? [Y/n]</b+<span style="color:#13496F">Please manually change your default shell to zsh</span
-Changing your shell to /usr/bin/zsh... +<span style="color:#FF0000"        </span><span style="color:#FF5F00">__      </span><span style="color:#FFFF00">           </span><span style="color:#5FFF00">        </span><span style="color:#0000FF">       </span><span style="color:#8700FF">     </span><span style="color:#D700AF">__   </span> 
-[sudo] tomoyan のパスワード: +<span style="color:#FF0000">  ____  </span><span style="color:#FF5F00">/ /_    </span><span style="color:#FFFF00"> ____ ___  </span><span style="color:#5FFF00">__  __  </span><span style="color:#0000FF"> ____  </span><span style="color:#8700FF">_____</span><span style="color:#D700AF">/ /_  </span> 
-tomoyan のシェルを変更します。 +<span style="color:#FF0000"> / __ \</span><span style="color:#FF5F00">/ __ \  </span><span style="color:#FFFF00"> / __ `__ \</span><span style="color:#5FFF00">/ / / / </span><span style="color:#0000FF"> /_  / </span><span style="color:#8700FF">/ ___/</span><span style="color:#D700AF"> __ \ </span> 
-chsh: シェルを変更しませんでした。 +<span style="color:#FF0000">/ /_/ /</span><span style="color:#FF5F00"> / / / </span><span style="color:#FFFF00"> / / / / / /</span><span style="color:#5FFF00"> /_/ / </span><span style="color:#0000FF">   / /_</span><span style="color:#8700FF">(__  )</span><span style="color:#D700AF"> / / / </span> 
-Shell successfully changed to '/usr/bin/zsh'+<span style="color:#FF0000">\____/</span><span style="color:#FF5F00">_/ /_/ </span><span style="color:#FFFF00"> /_/ /_/ /_/</span><span style="color:#5FFF00">\__, / </span><span style="color:#0000FF">   /___/</span><span style="color:#8700FF">____/</span><span style="color:#D700AF">_/ /_/  </span> 
- +<span style="color:#FF0000">    </span><span style="color:#FF5F00">        </span><span style="color:#FFFF00">           </span><span style="color:#5FFF00"> /____/ </span><span style="color:#0000FF">       </span><span style="color:#8700FF">     </span><span style="color:#D700AF">          </span><span style="color:#26A269">....is now installed!</span>
-         __                                     __    +
-  ____  / /_     ____ ___  __  __   ____  _____/ /_   +
- / __ \/ __ \   / __ `__ \/ / / /  /_  / / ___/ __ \  +
-/ /_/ / / / /  / / / / / / /_/ /    / /_(__  ) / / /  +
-\____/_/ /_/  /_/ /_/ /_/\__, /    /___/____/_/ /_/   +
-                        /____/                       ....is now installed!+
  
  
-Before you scream Oh My Zsh! look over the `.zshrc` file to select plugins, themes, and options.+Before you scream <span style="color:#A2734C"><b>Oh My Zsh!</b></span> look over the `.zshrc` file to select plugins, themes, and options.
  
-• Follow us on Twitter: @ohmyzsh +• Follow us on Twitter: <u style="text-decoration-style:single">https://twitter.com/ohmyzsh</u> 
-• Join our Discord community: Discord server +• Join our Discord community: <u style="text-decoration-style:single">https://discord.gg/ohmyzsh</u> 
-• Get stickers, t-shirts, coffee mugs and more: Planet Argon Shop+• Get stickers, t-shirts, coffee mugs and more: <u style="text-decoration-style:single">https://shop.planetargon.com/collections/oh-my-zsh</u>
  
 +<span style="color:#26A269"><b>➜  </b></span><span style="color:#2AA1B3"><b>~</b></span>
 </pre></html></WRAP> </pre></html></WRAP>
 </WRAP> </WRAP>
行 466: 行 541:
 </pre></html></WRAP> </pre></html></WRAP>
 </WRAP> </WRAP>
 +
 +<WRAP group><WRAP left tip 90%>
 +<html><code>chsh</code></html> コマンドが見つからない場合🤔\\
 +
 +<WRAP color_term>
 +<WRAP color_command><html><pre>
 +<b class=GRN>$</b> <b class=HIY>chsh</b> <b class=HIK>-s</b> $(which zsh)
 +</pre></html></WRAP>
 +<WRAP color_result><html><pre>
 +-bash: chsh: コマンドが見つかりません
 +</pre></html></WRAP>
 +</WRAP>
 +
 +util-linux-user パッケージをインストールする😉\\
 +<WRAP color_term>
 +<WRAP color_command><html><pre>
 +<b class=GRN>$</b> <b class=HIY>dnf</b> provides chsh
 +</pre></html></WRAP>
 +<WRAP color_result><html><pre>
 +メタデータの期限切れの最終確認: 0:00:23 時間前の 2023年09月23日 01時23分36秒 に実施しました。
 +util-linux-user-2.38.1-1.fc37.x86_64 : util-linux utilities based on libuser
 +Repo        : fedora
 +一致:
 +ファイル名    : /usr/bin/<span style="color:#A347BA"><b>chsh</b></span>
 +
 +</pre></html></WRAP>
 +</WRAP>
 +
 +<WRAP color_term>
 +<WRAP color_command><html><pre>
 +<b class=GRN>$</b> <b class=HIY>sudo dnf</b> install util-linux-user
 +</pre></html></WRAP>
 +<WRAP color_result_long><html><pre>
 +メタデータの期限切れの最終確認: 1:36:50 時間前の 2023年09月22日 23時53分44秒 に実施しました。
 +依存関係が解決しました。
 +==============================================================================================================
 + パッケージ                    アーキテクチャー     バージョン                     リポジトリー         サイズ
 +==============================================================================================================
 +インストール:
 + <span style="color:#26A269"><b>util-linux-user              </b></span> x86_64               2.38.1-1.fc37                  fedora                30 k
 +
 +トランザクションの概要
 +==============================================================================================================
 +インストール  1 パッケージ
 +
 +ダウンロードサイズの合計: 30 k
 +インストール後のサイズ: 60 k
 +これでよろしいですか? [y/N]: y
 +パッケージのダウンロード:
 +util-linux-user-2.38.1-1.fc37.x86_64.rpm                                      265 kB/s |  30 kB     00:00    
 +--------------------------------------------------------------------------------------------------------------
 +合計                                                                           71 kB/s |  30 kB     00:00     
 +トランザクションの確認を実行中
 +トランザクションの確認に成功しました。
 +トランザクションのテストを実行中
 +トランザクションのテストに成功しました。
 +トランザクションを実行中
 +  準備             :                                                                                      1/1 
 +  インストール中   : util-linux-user-2.38.1-1.fc37.x86_64                                                 1/
 +  scriptletの実行中: util-linux-user-2.38.1-1.fc37.x86_64                                                 1/
 +  検証             : util-linux-user-2.38.1-1.fc37.x86_64                                                 1/
 +
 +インストール済み:
 +  util-linux-user-2.38.1-1.fc37.x86_64                                                                        
 +
 +完了しました!
 +</pre></html></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 ====
行 475: 行 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>
行 541: 行 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>
  
行 551: 行 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|翻訳]]\\
  
 ==== 付録 ==== ==== 付録 ====
 [[tw>tomoyan596sp/status/1660792924354019329|Z Shellに移行完了😊]]\\ [[tw>tomoyan596sp/status/1660792924354019329|Z Shellに移行完了😊]]\\
 +[[tw>tomoyan596sp/status/1690274668031471616|無理やり!? Z shell の DietPi 対応😅]]\\
  
  • linux/zsh.1691819916.txt.gz
  • 最終更新: 2023/08/12 14:58
  • by ともやん