mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-29 23:24:55 +02:00
nix3-run: add more examples (#10620)
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com> Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
This commit is contained in:
parent
2004726dc1
commit
03982a8e16
1 changed files with 22 additions and 2 deletions
|
@ -4,10 +4,30 @@
|
|||
> See `tldr nix3 flake` for information about flakes.
|
||||
> More information: <https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-run.html>.
|
||||
|
||||
- Run the default application in the flake in the current directory:
|
||||
|
||||
`nix run`
|
||||
|
||||
- Run a command whose name matches the package name from nixpkgs (if you want a different command from that package, see `tldr nix3 shell`):
|
||||
|
||||
`nix run nixpkgs#{{pkg}}`
|
||||
|
||||
- Run the default application in the flake in the current directory:
|
||||
- Run a command with provided arguments:
|
||||
|
||||
`nix run`
|
||||
`nix run nixpkgs#{{vim}} -- {{path/to/file}}`
|
||||
|
||||
- Run from a remote repository:
|
||||
|
||||
`nix run {{remote_name}}:{{owner}}/{{repo}}`
|
||||
|
||||
- Run from a remote repository using a specific tag, revision or branch:
|
||||
|
||||
`nix run {{remote_name}}:{{owner}}/{{repo}}/{{reference}}`
|
||||
|
||||
- Run from a remote repository specifying a subdirectory and a program:
|
||||
|
||||
`nix run "{{remote_name}}:{{owner}}/{{repo}}?dir={{dir_name}}#{{app}}"`
|
||||
|
||||
- Run the flake of a GitHub pull request:
|
||||
|
||||
`nix run github:{{owner}}/{{repo}}/pull/{{number}}/head`
|
||||
|
|
Loading…
Add table
Reference in a new issue