Skip to content

Add basic logic for opening program manpages#111

Merged
Artturin merged 5 commits intonix-community:masterfrom
RossSmyth:openMan
Feb 12, 2026
Merged

Add basic logic for opening program manpages#111
Artturin merged 5 commits intonix-community:masterfrom
RossSmyth:openMan

Conversation

@RossSmyth
Copy link
Contributor

This adds the comma -m arg, which allows comma to open manpages for you. Example usage:

❯ , -m rg

which then opens the ripgrep manpage.

I tested it on my machine and it seems to work fine.

@RossSmyth
Copy link
Contributor Author

RossSmyth commented Oct 30, 2025

Maybe instead of a CLI flag it should be a subcommand, so it more closely replicates how man is used without comma, for example:

> , man rg

If for some reason a user wants to run , man, they can run , -- man and it will run the man program and not the subcommand.

@RossSmyth
Copy link
Contributor Author

Let me know which is preferred.

@SuperSandro2000
Copy link
Member

We already have -s for the shell, so -m is probably good enough for displaying the man page and I would not special case man subcommand.

@rszyma
Copy link

rszyma commented Nov 12, 2025

, man <cmd> is likely what people naturally try and it fails miserably (I did at least!). If we implemented this, it would be a nice UX, since it's so natural.

RossSmyth and others added 2 commits February 12, 2026 12:10
Otherwise only `out` is passed

```
$ RUST_LOG=TRACE cargo run -- man znapzend
updating cache entry for command 'znapzend': CacheEntry { derivation: "znapzend.out", path: None }
run nix command arguments: "nix" "--extra-experimental-features" "nix-command flakes" "shell" "-f" "<nixpkgs>" "znapzend.out" "--command" "man" "znapzend"
No manual entry for znapzend
```

```
$ nix shell "nixpkgs#znapzend" --command man znapzend

$ nix shell "nixpkgs#znapzend.out" --command man znapzend
No manual entry for znapzend
```
@Artturin
Copy link
Member

Thanks

@Artturin Artturin merged commit 7dc70f2 into nix-community:master Feb 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants