id = "diffnav" name = "diffnav" homepage = "https://github.com/dlvhdr/diffnav" description = "A git diff pager based on delta with a file tree." executables = ["diffnav"] [dotfiles] paths = ["[configHome]/diffnav/config.yml", "[appData]/diffnav/config.yml"] secret = [] # diffnav documents config.yml in ~/.config/diffnav and the OS-specific # application-support directory as user configuration locations. # https://github.com/dlvhdr/diffnav [commands] format = 1 label = "Diff viewer" description = "Open diffnav with a view mode or watch mode. Piped diffs (git diff | diffnav) are not covered; this form uses watch mode." quality = "ai-draft" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = false, short_bundles = false } [[commands.source]] id = "readme" kind = "help" url = "https://github.com/dlvhdr/diffnav/blob/main/README.md" evidence = """ | `--side-by-side, -s` | Force side-by-side diff view | | `--unified, -u` | Force unified diff view | | `--watch, -w` | Watch mode: periodically re-run a command and refresh | | `--watch-cmd` | Command to run in watch mode (implies `--watch`, default: `git diff`) | | `--watch-interval` | Interval between watch refreshes (default: `2s`) | diffnav --watch-cmd "git diff --cached" --watch-interval 5s """ [[commands.field]] id = "side_by_side" label = "Side-by-side view" type = "boolean" option = ["--side-by-side", "-s"] sources = ["readme"] [[commands.field]] id = "unified" label = "Unified view" type = "boolean" option = ["--unified", "-u"] sources = ["readme"] [[commands.field]] id = "watch" label = "Watch mode" description = "Periodically re-run a command (default: git diff) and refresh." type = "boolean" option = ["--watch", "-w"] sources = ["readme"] [[commands.field]] id = "watch_cmd" label = "Watch command" description = "Implies watch mode." type = "string" option = ["--watch-cmd"] suggestions = [{ value = "git diff --cached", label = "Staged changes" }, { value = "git diff", label = "Unstaged changes" }] sources = ["readme"] [[commands.field]] id = "watch_interval" label = "Refresh interval" description = "For example 2s or 5s." type = "string" option = ["--watch-interval"] sources = ["readme"] [[commands.task]] id = "watch" label = "Watch changes" fields = ["watch", "watch_cmd", "watch_interval", "unified"] required = [] set = { watch = [true] } [[commands.group]] id = "basic" label = "Basic" fields = ["side_by_side", "unified", "watch", "watch_cmd", "watch_interval"]