Closed gilligan closed 2 years ago
This PR aims at improving the UX around the npins show command by making the output easier to digest and more condensed:
npins show
$ npins show nixpkgs: GitHub:nixpkgs/nixos@8f39ad3da14ce78daf249c8291a4e43a17bbcf98 (nixpkgs-unstable) pre-commit-hooks.nix: GitHub:pre-commit-hooks.nix/cachix@433808cba23975201a48a3bb8ebc76029191fafd (master)
Relevant changes:
mkPin
Pin
src/pin.rs
show
ansi_term
Superseded by #23.
I tried to incorporate as many changes from here as possible, if I missed any please let me know or simply open a new pull request.
This PR aims at improving the UX around the
npins show
command by making the output easier to digest and more condensed:Relevant changes:
mkPin
macro into explicit Pin types: this was necessary in order to provide custom Display implementations for different pin typesPin
tosrc/pin.rs
moduleshow
function to yield the aboveansi_term
crate and used it to print pin names in bold in the show command