Skip to content

Commit

Permalink
nixos-option: filter out attributes starting with _
Browse files Browse the repository at this point in the history
  • Loading branch information
hedning committed Dec 4, 2018
1 parent 6d15422 commit 9429f3d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions _nix
Original file line number Diff line number Diff line change
Expand Up @@ -774,8 +774,12 @@ function _nix_completion () {
':->nixos_options' && return 0

if [[ "$state" == nixos_options ]]; then
_nix_attr_paths \
'((import <nixpkgs/lib>).evalModules { modules = import <nixpkgs/nixos/modules/module-list.nix>; }).options'
_nix_attr_paths '
with import <nixpkgs/lib>;
filterAttrsRecursive
(k: _: substring 0 1 k != "_")
(evalModules { modules = import <nixpkgs/nixos/modules/module-list.nix>; }).options
'
return 0
fi

Expand Down

0 comments on commit 9429f3d

Please sign in to comment.