Smart file and directory viewer
Project description
L command
l コマンドは、 less のかわりにも ls のかわりにもなる新しいコマンドです。ファイルやディレクトリの中身をスマートに判別し、最適な方法で表示します。
Usage
l /path/to/file: ファイルの内容を適切な方法で表示します- ファイルが短い場合:
catとして表示 - ファイルが長い場合:
less -RFXとして表示 - JSONファイルの場合:
jqを使用して整形表示
- ファイルが短い場合:
l /path/to/directory:ls -la --color=auto /path/to/directoryとして働きますl /path/to/json: JSONファイルを検出し、jqを使用して整形表示します
詳細な動作仕様
- ファイルサイズや行数を自動判別し、短ければ
cat、長ければlessを使用 - ターミナルの高さを自動検出し、ファイルの行数がターミナルの高さを超える場合は
lessを使用 - JSONファイルの自動検出と整形
- 拡張子が
.jsonのファイル - 拡張子がなくても、先頭部分が
{または[で始まるUTF-8ファイル jq emptyによる構文チェックを行い、無効なJSONはデフォルト表示にフォールバック- 大きなJSONファイル(10MB以上)はデフォルト表示にフォールバック
- 拡張子が
- ディレクトリの自動判別と一覧表示
オプション
現在はコマンドライン引数は以下のとおりです:
- 位置引数
path: 表示するファイルまたはディレクトリのパス (デフォルト: カレントディレクトリ.)
ユースケース
- 単に中身を見たい時に
l file.txt - ディレクトリの内容を一目で確認したい時に
l ./myfolder - JSONファイルを整形して読みたいとき
l data.json
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file l_command-0.1.0.tar.gz.
File metadata
- Download URL: l_command-0.1.0.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbbed354a84a56462e08de6aed023ffbf7f2791f9e00113f68439d76b9814f66
|
|
| MD5 |
f14e61ed5e40ccf83bf1a21311a96d1c
|
|
| BLAKE2b-256 |
5a990e7d5d92ab02528d877794ddf114054873e8d7694eba60e7872eb1802117
|
Provenance
The following attestation bundles were made for l_command-0.1.0.tar.gz:
Publisher:
release.yml on gyu-don/l-command
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
l_command-0.1.0.tar.gz -
Subject digest:
fbbed354a84a56462e08de6aed023ffbf7f2791f9e00113f68439d76b9814f66 - Sigstore transparency entry: 196245878
- Sigstore integration time:
-
Permalink:
gyu-don/l-command@372c52b6fba137fde7e851a44b1a1f77d36d1989 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/gyu-don
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@372c52b6fba137fde7e851a44b1a1f77d36d1989 -
Trigger Event:
release
-
Statement type:
File details
Details for the file l_command-0.1.0-py3-none-any.whl.
File metadata
- Download URL: l_command-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
601e2c08c8ddf9050d9be89934f7d287a7d6fb2799c426cff0c4b445994e1be9
|
|
| MD5 |
2e6a097ac64b31b42b879dd4ffd9832b
|
|
| BLAKE2b-256 |
0a30d59dbb345c3d934f0e45944c6bfd110cd1737364e81ed640288614f10f02
|
Provenance
The following attestation bundles were made for l_command-0.1.0-py3-none-any.whl:
Publisher:
release.yml on gyu-don/l-command
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
l_command-0.1.0-py3-none-any.whl -
Subject digest:
601e2c08c8ddf9050d9be89934f7d287a7d6fb2799c426cff0c4b445994e1be9 - Sigstore transparency entry: 196245879
- Sigstore integration time:
-
Permalink:
gyu-don/l-command@372c52b6fba137fde7e851a44b1a1f77d36d1989 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/gyu-don
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@372c52b6fba137fde7e851a44b1a1f77d36d1989 -
Trigger Event:
release
-
Statement type: