Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# fish-eza — Repository Guidelines

## Project Structure & Module Organization

fish shell plugin that replaces `ls`-style aliases with `eza` equivalents. Installed via [Fisher](https://github.com/jorgebucaran/fisher) 4.0+.

| Path | Purpose |
|------|---------|
| `conf.d/fish-eza.fish` | Main entry point — install/update/uninstall event handlers. Defines all aliases and their `EZA_*_OPTIONS` env vars. |
| `functions/eza_git.fish` | Auto-detects git repos and appends `--git` to `ll*` aliases. |

## Build, Test, and Development Commands

No build system or test suite. This is a pure fish shell plugin.

- **Install locally**: `fisher install ./fish-eza` (from parent dir) or clone and `fisher install <local-path>`
- **Uninstall**: `fisher uninstall plttn/fish-eza`
- **Validate syntax**: `fish --check conf.d/fish-eza.fish && fish --check functions/eza_git.fish`
- **Test in shell**: `fish` then run `ll`, `lla`, `ltaa`, etc.

## Coding Style & Naming Conventions

- Fish shell syntax: 4-space indentation, `set` for variables, `function` blocks for logic
- Env vars are uppercase with underscores: `EZA_STANDARD_OPTIONS`, `EZA_LL_OPTIONS`, `EZA_LI_OPTIONS`
- Internal vars prefixed with `__FISH_EZA_` to avoid collisions
- Alias names are lowercase short forms: `l`, `ll`, `lg`, `le`, `lt`, `lc`, `lo`
- Extended aliases append suffixes: `lla`, `llad`, `ltaa`, etc.
- `ll*` aliases route through `eza_git` function (auto `--git` in git repos); all others call `eza` directly

## Key Conventions

- Extended options are **prepended** to base alias options in the alias expansion
- `ltaa` and `ltaac` are skipped (`--tree` is useless with `--all --all`)
- Config uses `set -Ux` for universal exports; users should avoid quotes — set vars as lists
- No nested AGENTS.md or project skills needed for this small repo
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ fisher install plttn/fish-eza
| alias | default options |
| ---------------- | -------------------------------------------------------------------------- |
| `l` | `eza` |
| `ls` | `eza` |
| `ll` | `eza --group --header --group-directories-first --long` |
| `ll` in git repo | `eza --group --header --group-directories-first --long --git` |
| `lg` | `eza --group --header --group-directories-first --long --git --git-ignore` |
| `le` | `eza --group --header --group-directories-first --long --extended` |
| `lt` | `eza --group --header --group-directories-first --tree --level LEVEL` |
| `lt` | `eza --group --header --group-directories-first --tree --level 2` |
| `lc` | `eza --group --header --group-directories-first --across` |
| `lo` | `eza --group --header --group-directories-first --oneline` |

Expand All @@ -33,12 +34,12 @@ Each base alias has its extended versions with additional options.

An extended alias is one of the form `<BASE ALIAS><SUFFIX>` with suffix from the following:

| Extend suffix | Default options |
| Extend suffix | Default options |
| ------------- | ------------------------------------------ |
| `a` | `--all --binary` |
| `d` | `--only-dirs` |
| `i` | `--icons` |
| `id` | `--icons --only-dirs` |
| `i` | `--icons` |
| `id` | `--icons --only-dirs` |
| `aa` | `--all --binary --all` |
| `ad` | `--all --binary --only-dirs` |
| `ai` | `--all --binary --icons` |
Expand All @@ -58,7 +59,7 @@ ezamples:
llad => --all --binary --only-dirs --group --header --group-directories-first --long
------------ad------------ -----------------------ll------------------------

ltaa => --all --binary --all --group --header --group-directories-first --tree --level LEVEL
ltaa => --all --binary --all --group --header --group-directories-first --tree --level 2
---------aa--------- ------------------------------lt--------------------------------
```

Expand Down
5 changes: 3 additions & 2 deletions conf.d/fish-eza.fish
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function __fish_eza_install --on-event fish-eza_install
set -Ux __FISH_EZA_BASE_ALIASES l ll lg le lt lc lo
set -Ux __FISH_EZA_BASE_ALIASES l ll lg le ls lt lc lo
set -Ux __FISH_EZA_EXPANDED a d i id aa ad ai aid aad aai aaid
set -Ux __FISH_EZA_EXPANDED_OPT_NAME LA LD LI LID LAA LAD LAI LAID LAAD LAAI LAAID
set -Ux __FISH_EZA_OPT_NAMES
Expand All @@ -13,7 +13,8 @@ function __fish_eza_install --on-event fish-eza_install
set -Ux EZA_LL_OPTIONS "--long"
set -Ux EZA_LG_OPTIONS "--git" "--git-ignore" "--long"
set -Ux EZA_LE_OPTIONS "--extended" "--long"
set -Ux EZA_LT_OPTIONS "--tree" "--level"
set -Ux EZA_LS_OPTIONS
set -Ux EZA_LT_OPTIONS "--tree" "--level" "2"
set -Ux EZA_LC_OPTIONS "--across"
set -Ux EZA_LO_OPTIONS "--oneline"

Expand Down