Closed gvolpe closed 3 years ago
implemented in https://github.com/mlvzk/manix/commit/7e905be2c72ac0795ff8b5d919683f426186c057 Care to try before I tag release?
You can either compile it yourself with cargo build --release
and running the binary in target/release/manix
or you can use this binary.
Example usage: manix test --source=nixos_options,nixpkgs_doc
Works like a charm, thanks a lot!
❯ manix -s programs.chromium --source hm_options
HomeManager Options
────────────────────
# programs.chromium.extensions
List of Chromium extensions to install.
To find the extension ID, check its URL on the
<link xlink:href="https://chrome.google.com/webstore/category/extensions">Chrome Web Store</link>.
type: list of strings
HomeManager Options
────────────────────
# programs.chromium.enable
Whether to enable Chromium.
type: boolean
HomeManager Options
────────────────────
# programs.chromium.package
The Chromium package to use.
type: package
@mlvzk additionally, would a --list-sources
flag make sense? otherwise, it might be non-obvious what the exact names of the different sources are. It could also be possible to check for source availability here, to allow any scripts that make use of manix to restrict themselves to the available sources (-> only show home-manager when home-manager is available, etc). With scripts i'm thinking about things like a rofi menu to search through manix, etc
@elkowar you can get that from --help
.
❯ manix --help
manix 0.6.2
USAGE:
manix [FLAGS] [OPTIONS] <QUERY>
FLAGS:
-h, --help Prints help information
-s, --strict Matches entries stricly
-u, --update-cache Force update cache
-V, --version Prints version information
OPTIONS:
--source <source>... Restrict search to chosen sources [default:
nixos_options,hm_options,nixpkgs_doc,nixpkgs_tree,nixpkgs_comments] [possible values:
nixos_options, hm_options, nixpkgs_doc, nixpkgs_tree, nixpkgs_comments]
ARGS:
<QUERY>
i guess, but that's not particularily parseable for scripts, which is why a --list-sources
might still be nice. Of course this is more of a nice-to-have ;D
Hi, thanks for working on this, it's awesome!
I was wondering if it would be possible to add a
--source
option (or something like that) so it can only search in a specific source (e.g. only search Home Manager options)?For example, if I search for
programs.chromium
, I currently get this result:When I'm only interested in seeing Home Manager options. I could filter the results out using
grep
orripgrep
but I think it would be more efficient to only search in the sources I'm interested in.What do you think?