Skip to content

Commit

Permalink
Merge pull request #50 from DeterminateSystems/version-0.1.6
Browse files Browse the repository at this point in the history
Patch version bump to 0.1.6
  • Loading branch information
lucperkins authored Oct 5, 2023
2 parents 9dff320 + ff4edc7 commit 4cd8c02
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "fh"
version = "0.1.5"
version = "0.1.6"
authors = ["Determinate Systems <[email protected]>"]
edition = "2021"
license = "Apache 2.0"
Expand Down
76 changes: 66 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Respond to the prompts it provides you and at the end `fh` will write a `flake.n

`fh init` has built-in support for the following languages:

* [Elm]
* [Go]
* [Java]
* [JavaScript]
Expand Down Expand Up @@ -142,7 +143,8 @@ fh list releases nixos/nixpkgs
| 0.1.429304+rev-27ccd29078f974ddbdd7edc8e38c8c8ae003c877 |
| 0.1.429553+rev-5dc7114b7b256d217fe7752f1614be2514e61bb8 |
| 0.1.429868+rev-a115bb9bd56831941be3776c8a94005867f316a7 |
...
| ... |
+------------------------------------------------------------+
```

### Listing flakes, organizations, and versions
Expand All @@ -162,10 +164,10 @@ fh list flakes
| ajaxbits/audiobookshelf https://flakehub.com/flake/ajaxbits/audiobookshelf |
| ajaxbits/tone https://flakehub.com/flake/ajaxbits/tone |
| astro/deadnix https://flakehub.com/flake/astro/deadnix |
...
| ... ... |
+---------------------------------------------------------------------------------------------------------------+
```


#### List orgs

```shell
Expand All @@ -178,7 +180,8 @@ fh list orgs
+-------------------------------------------------------------------------+
| ajaxbits https://flakehub.com/org/ajaxbits |
| astro https://flakehub.com/org/astro |
...
| ... ... |
+-------------------------------------------------------------------------+
```

#### List versions
Expand All @@ -192,17 +195,64 @@ fh list versions <flake> <version_req>
Here's an example:

```shell
fh list versions hyprwm/Hyprland "0.1.*"
fh list versions DeterminateSystems/flake-checker "0.1.*"
```

```console
+------------------------------------------------------------------------------------------------------------------------------+
| Simplified version FlakeHub URL Full version |
+------------------------------------------------------------------------------------------------------------------------------+
| 0.1.546 https://flakehub.com/flake/hyprwm/Hyprland/0.1.546 0.1.546+rev-d8c5e53c0803eb118080657734160bf3ab5127d2 |
+------------------------------------------------------------------------------------------------------------------------------+
+------------------------------------------------------------------------------------------------------+
| Simplified version FlakeHub URL Full version |
+------------------------------------------------------------------------------------------------------+
| 0.1.0 https://flakehub.com/flake/DeterminateSystems/flake-checker/0.1.0 0.1.0 |
| 0.1.1 https://flakehub.com/flake/DeterminateSystems/flake-checker/0.1.1 0.1.1 |
| 0.1.2 https://flakehub.com/flake/DeterminateSystems/flake-checker/0.1.2 0.1.2 |
| ... ... ... |
+------------------------------------------------------------------------------------------------------+
```

### List by label

You can list flakes by label using the `fh list label` comand:

```shell
fh list label <label>
```

Here's an example:

```shell
fh list label python
```

```console
+-------------------------------------------------------------------------------+
| Flake FlakeHub URL |
+-------------------------------------------------------------------------------+
| nix-community/poetry2nix https://flakehub.com/flake/nix-community/poetry2nix |
+-------------------------------------------------------------------------------+
```

## Shell completion

You can generate shell completion scripts using the `fh completion` command:

```shell
fh completion <shell>
```

Here's an example:

```shell
fh completion bash
```

These shells are supported:

* [Bash]
* [Elvish]
* [Fish]
* [Powershell]
* [zsh]

## A note on automation

Piping `fh list` commands to another program emits [CSV] instead of the stylized table.
Expand All @@ -217,7 +267,11 @@ You can apply the `--json` flag to each list command to produce JSON output.

For support, email [email protected] or [join our Discord](https://discord.gg/invite/a4EcQQ8STr).

[bash]: https://gnu.org/software/bash
[csv]: https://en.wikipedia.org/wiki/Comma-separated_values
[elm]: https://elm-lang.org
[elvish]: https://elv.sh
[fish]: https://fishshell.com
[flakehub]: https://flakehub.com
[flakes]: https://flakehub.com/flakes
[go]: https://golang.org
Expand All @@ -229,8 +283,10 @@ For support, email [email protected] or [join our Discord](https://discord.gg
[nixpkgs]: https://zero-to-nix.com/concepts/nixpkgs
[orgs]: https://flakehub.com/orgs
[php]: https://php.net
[powershell]: https://learn.microsoft.com/powershell
[python]: https://python.org
[ruby]: https://ruby-lang.org
[rust]: https://rust-lang.org
[semver]: https://flakehub.com/docs#semver
[zig]: https://ziglang.org
[zsh]: https://zsh.org

0 comments on commit 4cd8c02

Please sign in to comment.