Oil Shell

提供: ArchWiki
2022年8月5日 (金) 13:25時点におけるKusanaginoturugi (トーク | 投稿記録)による版 (Kusanaginoturugi がページ「OSH」を「Oil Shell」に移動しました: 英語版に追従)
ナビゲーションに移動 検索に移動

OSH (Oil Shell) は Bash 互換の UNIX コマンドラインシェルです。OSH は GNU/Linux など様々な UNIX ライクなオペレーティングシステムで動作します。Python (v2.7) で書かれていますが、ネイティブの実行ファイルが含まれています。OSH が使用する Bash の方言は OSH 言語と呼ばれます。

インストール

oshAUR パッケージをインストールしてください。

スモークテスト

ターミナルで以下のコマンドを実行して OSH が正しくインストールされたことを確認:

$> osh

OSH セッションが起動してシェルプロンプトが以下のように変化します:

osh$

OSH セッションでインストールしたバイナリを呼び出してみて出力が正しいか確認してください。

例:

osh$ ls
...

OSH をデフォルトシェルに設定

コマンドシェル#デフォルトシェルを変更するを見てください。

アンインストール

デフォルトシェルを変更してから oshAUR パッケージを削除してください。

警告: 以下の手順で削除しないとユーザーからシェルが使えなくなる可能性があります。

以下のコマンドを実行:

$ chsh -s /bin/bash user

osh をログインシェルに設定した全てのユーザーで上記のコマンドを実行してください (必要であれば root も)。完了したら oshAUR パッケージを削除してかまいません。

もしくは root で /etc/passwd を編集してデフォルトシェルを Bash に戻してください。

警告: /etc/passwd を編集するときは vipw を使うことを推奨します。不正なエントリを作ってしまったり構文エラーが発生するのを避けることができます。

例えば、以下のようになっている場合:

username:x:1000:1000:Full Name,,,:/home/username:/bin/osh

以下のように変更:

username:x:1000:1000:Full Name,,,:/home/username:/bin/bash

Troubleshooting

Reproducible bugs/errors may be reported on Github. When filing a report, please include the output of OSH when it is running in verbose mode. To enable verbose mode, execute the following:

$> export OVM_VERBOSE=1

Assertion `sts != -1' failed

$> osh
osh: Modules/main.c:347: Ovm_Main: Assertion `sts != -1' failed.
Aborted (core dumped)

This error occurs when the OSH binary is stripped. The PKGBUILD file in the AUR explicitly disables binary stripping; however, custom makepkg configuration files may override this option. In the event of this error, attempt to reinstall OSH without any custom configuration

参照