Smart file and directory viewer
Project description
L command
l command is a smart file and directory viewer that can replace both less and ls. It intelligently detects the content type and displays it in the most appropriate way.
Usage
l /path/to/file: Display file content appropriately- Short files: Display using
cat - Long files: Display using
less -RFX - JSON files: Format and display using
jq - Archive files: List contents using appropriate tools (
unzip -l,tar -tvf) - Binary files: Display using
hexdump -C
- Short files: Display using
l /path/to/directory: Works asls -la --color=auto /path/to/directoryl /path/to/json: Detects JSON files and formats them usingjql /path/to/archive: Detects archive files (zip, tar, etc.) and lists their contents
Detailed Behavior
- Automatically detects file size and line count, using
catfor short files andlessfor long files - Detects terminal height and uses
lessif the file has more lines than the terminal height - Automatic JSON detection and formatting:
- Files with
.jsonextension - Files without extension but starting with
{or[(UTF-8 encoded) - Performs syntax check using
jq empty, falling back to default display for invalid JSON - Falls back to default display for large JSON files (>10MB)
- Files with
- Archive file detection and content listing:
- ZIP files (including .jar, .war, .ear, .apk, .ipa)
- TAR archives (including .tar.gz, .tgz, .tar.bz2, .tbz2, .tar.xz, .txz, .tar.zst)
- Binary file detection and hexdump display:
- Uses
filecommand to detect binary files when available - Falls back to content-based detection (checking for null bytes and non-printable characters)
- Displays binary files using
hexdump -C
- Uses
- Directory detection and listing
Options
Currently, the command line arguments are as follows:
- Positional argument
path: Path to the file or directory to display (default: current directory.)
Use Cases
- View file content quickly:
l file.txt - Check directory contents at a glance:
l ./myfolder - Format and read JSON files:
l data.json - List contents of archive files:
l archive.zip - View binary files in hexdump format:
l binary.bin
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.2.0.tar.gz.
File metadata
- Download URL: l_command-0.2.0.tar.gz
- Upload date:
- Size: 12.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2faf9455e173a3587c211bfec0674d6fd89f044accf6f0f7f4cc644f894581a7
|
|
| MD5 |
08ede8e8ec22e115be7d4c63fedc7c37
|
|
| BLAKE2b-256 |
de40e34cf78711d282b8872aced8804a8e65d824427b01840aec2a5c6f91afef
|
Provenance
The following attestation bundles were made for l_command-0.2.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.2.0.tar.gz -
Subject digest:
2faf9455e173a3587c211bfec0674d6fd89f044accf6f0f7f4cc644f894581a7 - Sigstore transparency entry: 199535988
- Sigstore integration time:
-
Permalink:
gyu-don/l-command@e2559e51f50b02947f567e3883b4c8e490052e47 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/gyu-don
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e2559e51f50b02947f567e3883b4c8e490052e47 -
Trigger Event:
release
-
Statement type:
File details
Details for the file l_command-0.2.0-py3-none-any.whl.
File metadata
- Download URL: l_command-0.2.0-py3-none-any.whl
- Upload date:
- Size: 17.2 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 |
fcc2bb1b87d7f56656e435a083dbcf9b3c8f8d4ab62c1dff8a760bd86677d9a1
|
|
| MD5 |
f8f2255e999e7e5692a1c3aa9e0611df
|
|
| BLAKE2b-256 |
cfcf201b067e4345e62ef1d5ce1cea7b34ac2555cab5b4f0611967e10e97d0a0
|
Provenance
The following attestation bundles were made for l_command-0.2.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.2.0-py3-none-any.whl -
Subject digest:
fcc2bb1b87d7f56656e435a083dbcf9b3c8f8d4ab62c1dff8a760bd86677d9a1 - Sigstore transparency entry: 199535995
- Sigstore integration time:
-
Permalink:
gyu-don/l-command@e2559e51f50b02947f567e3883b4c8e490052e47 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/gyu-don
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e2559e51f50b02947f567e3883b4c8e490052e47 -
Trigger Event:
release
-
Statement type: