Skip to content

v0.2.0

Choose a tag to compare

@philiptaron philiptaron released this 01 Oct 12:47
· 82 commits to main since this release
530bc25

h and up are now written in Rust. The command-line interface and the shell functions they generate are unchanged, so existing eval "$(h-shell-init ...)" setups keep working.

New since 0.1.0

  • Tab completion for bash and zsh, set up automatically by h-shell-init. Only the code for the shell running the eval is emitted.
  • macOS support:
    • h-shell-init and up-shell-init find the h and up next to them, even when run from $PATH. Before, macOS fell back to ./h in the current directory.
    • The parent shell is detected through proc_name, so completion works on macOS too.
  • The GitHub casing lookup uses the system certificate store, through ureq and rustls, instead of libcurl and cJSON.

Fixes

  • h user/repo.git, and GitHub URLs ending in .git, no longer produce a repo.git.git clone URL.
  • Name search can find directories ending in .git, such as bare checkouts.
  • When several directories at the same depth match a name, h now always picks the first in sorted order.
  • ~user/... code roots are no longer turned into $HOMEuser/....
  • Paths from URLs are always joined under the code root.
  • up no longer loops forever on a relative $PWD.

Under the hood

  • Cargo workspace:
    • h-core: helpers shared by both tools
    • h-git: resolving terms, search, GitHub lookups, cloning
    • h-cli: h and h-shell-init
    • up-cli: up and up-shell-init
  • Tests: 110 unit and end-to-end tests. They use a mock GitHub API and a fake git, do one real local clone, and run the generated functions in bash and zsh. nix build runs them.
  • CI: builds and tests on Linux and macOS, smoke-tests the installed programs, and checks rustfmt, clippy and nixfmt.
  • The version now comes from Cargo.toml instead of git describe.