linux:zsh

文書の過去の版を表示しています。


Z shell(Zsh)

Z Shell 001

本家: Zsh - zsh.org
ソースコード: zsh / Code - sourceforge.net

Z shell (Zsh) は、対話型ログインシェルとして、またシェル スクリプトのコマンド インタープリタとして使用できる Unix シェルである。Zsh は、Bash、ksh、および tcsh のいくつかの機能を含む、多くの改良が施された拡張 Bourne シェルである。

Zsh は、プリンストン大学の学生だった 1990 年に Paul Falstad によって作成された。ksh と tcsh の両方の機能を組み合わせ、プログラム可能なコマンドライン補完、拡張ファイルグロビング、改善された変数/配列処理、テーマ対応プロンプトなどの機能を提供する。

Zsh は、 UnxUtils コレクションの一部として Microsoft Windows で利用でき、macOS および Kali Linux のデフォルト シェルとして採用されています。“Oh My Zsh” ユーザー コミュニティ Web サイトは、サードパーティのプラグインとテーマ用のプラットフォームを提供し、大規模で活発な寄稿者ベースを特徴としている。
Z shell - Wikiwand 翻訳 より

Oh My Zsh 公式: Installing ZSH - ohmyzsh/ohmyzsh: 🙃 A delightful community-driven (with 2,100+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python, etc), 140+ themes to spice up your morning, and an auto-update tool so that makes it easy to keep up with the latest updates from the community.

$ sudo dnf install zsh

メタデータの期限切れの最終確認: 0:01:08 時間前の 2023年05月22日 12時10分04秒 に実施しました。
依存関係が解決しました。
==============================================================================================================
 パッケージ            アーキテクチャー         バージョン                     リポジトリー             サイズ
==============================================================================================================
インストール:
 zsh                   x86_64                   5.9-5.fc38                     fedora                   3.3 M

トランザクションの概要
==============================================================================================================
インストール  1 パッケージ

ダウンロードサイズの合計: 3.3 M
インストール後のサイズ: 8.0 M
これでよろしいですか? [y/N]: y
パッケージのダウンロード:
zsh-5.9-5.fc38.x86_64.rpm                                                     242 kB/s | 3.3 MB     00:13    
--------------------------------------------------------------------------------------------------------------
合計                                                                          225 kB/s | 3.3 MB     00:14     
トランザクションの確認を実行中
トランザクションの確認に成功しました。
トランザクションのテストを実行中
トランザクションのテストに成功しました。
トランザクションを実行中
  準備             :                                                                                      1/1 
  インストール中   : zsh-5.9-5.fc38.x86_64                                                                1/1 
  scriptletの実行中: zsh-5.9-5.fc38.x86_64                                                                1/1 
  検証             : zsh-5.9-5.fc38.x86_64                                                                1/1 

インストール済み:
  zsh-5.9-5.fc38.x86_64                                                                                       

完了しました!

$ zsh --version

zsh 5.9 (x86_64-redhat-linux-gnu)

$ zsh --version

zsh 5.9 (x86_64-redhat-linux-gnu)

$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Cloning Oh My Zsh...
remote: Enumerating objects: 1334, done.
remote: Counting objects: 100% (1334/1334), done.
remote: Compressing objects: 100% (1288/1288), done.
remote: Total 1334 (delta 34), reused 1013 (delta 25), pack-reused 0;
Receiving objects: 100% (1334/1334), 1.99 MiB | 2.59 MiB/s, done.
Resolving deltas: 100% (34/34), done.
From https://github.com/ohmyzsh/ohmyzsh
 * [new branch]      master     -> origin/master
branch 'master' set up to track 'origin/master'.
Already on 'master'
/home/tomoyan

Looking for an existing zsh config...
Found old .zshrc.pre-oh-my-zsh. Backing up to /home/tomoyan/.zshrc.pre-oh-my-zsh-2023-05-23_11-56-22
Found /home/tomoyan/.zshrc. Backing up to /home/tomoyan/.zshrc.pre-oh-my-zsh
Using the Oh My Zsh template file and adding it to /home/tomoyan/.zshrc.

Time to change your default shell to zsh:
Do you want to change your default shell to zsh? [Y/n] y
Changing your shell to /usr/bin/zsh...
[sudo] tomoyan のパスワード:
tomoyan のシェルを変更します。
chsh: シェルを変更しませんでした。
Shell successfully changed to '/usr/bin/zsh'.

         __                                     __   
  ____  / /_     ____ ___  __  __   ____  _____/ /_  
 / __ \/ __ \   / __ `__ \/ / / /  /_  / / ___/ __ \ 
/ /_/ / / / /  / / / / / / /_/ /    / /_(__  ) / / / 
\____/_/ /_/  /_/ /_/ /_/\__, /    /___/____/_/ /_/  
                        /____/                       ....is now installed!


Before you scream Oh My Zsh! look over the `.zshrc` file to select plugins, themes, and options.

• Follow us on Twitter: @ohmyzsh
• Join our Discord community: Discord server
• Get stickers, t-shirts, coffee mugs and more: Planet Argon Shop

$ zsh


This is the Z Shell configuration function for new users,
zsh-newuser-install.
You are seeing this message because you have no zsh startup files
(the files .zshenv, .zprofile, .zshrc, .zlogin in the directory
~).  This function can help you with a few settings that should
make your use of the shell easier.

You can:

(q)  Quit and do nothing.  The function will be run again next time.

(0)  Exit, creating the file ~/.zshrc containing just a comment.
     That will prevent this function being run again.

(1)  Continue to the main menu.

--- Type one of the keys in parentheses --- 1

これは新規ユーザー向けの Z Shell 設定機能です。
zsh-newuser-install。
zsh 起動ファイルがないため、このメッセージが表示されます。
(ディレクトリ内のファイル .zshenv、.zprofile、.zshrc、.zlogin
~)。この機能は、必要ないくつかの設定に役立ちます。
シェルをより簡単に使用できるようになります。

あなたはできる:

(q) やめて何もしないでください。この関数は次回も実行されます。

(0) コメントのみを含むファイル ~/.zshrc を作成して終了します。
     これにより、この関数は再度実行されなくなります。

(1) メインメニューに進みます。

--- 括弧内にいずれかのキーを入力します ---


Please pick one of the following options:

(1)  Configure settings for history, i.e. command lines remembered
     and saved by the shell.  (Recommended.)

(2)  Configure the new completion system.  (Recommended.)

(3)  Configure how keys behave when editing command lines.  (Recommended.)

(4)  Pick some of the more common shell options.  These are simple "on"
     or "off" switches controlling the shell's features.  

(0)  Exit, creating a blank ~/.zshrc file.

(a)  Abort all settings and start from scratch.  Note this will overwrite
     any settings from zsh-newuser-install already in the startup file.
     It will not alter any of your other settings, however.

(q)  Quit and do nothing else.  The function will be run again next time.
--- Type one of the keys in parentheses --- 0

次のオプションのいずれかを選択してください。

(1) 履歴の設定を構成します。つまり、コマンドラインを記憶します。
     そしてシェルによって保存されます。 (おすすめされた。)

(2) 新しい補完システムを構成します。 (おすすめされた。)

(3) コマンドライン編集時のキーの動作を設定します。 (おすすめされた。)

(4) より一般的なシェル オプションをいくつか選択します。これらは単純に「オン」です
     またはシェルの機能を制御する「オフ」スイッチ。

(0) 終了し、空の ~/.zshrc ファイルを作成します。

(a) すべての設定を中止し、最初からやり直します。これは上書きされることに注意してください
     zsh-newuser-install の設定はすでに起動ファイルに含まれています。
     ただし、他の設定は変更されません。

(q) 辞めて何もしません。この関数は次回も実行されます。
--- 括弧内にいずれかのキーを入力します ---

  • linux/zsh.1685040446.txt.gz
  • 最終更新: 2023/05/26 03:47
  • by ともやん