diff options
Diffstat (limited to 'krebs/5pkgs/simple/brain/default.nix')
-rw-r--r-- | krebs/5pkgs/simple/brain/default.nix | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/krebs/5pkgs/simple/brain/default.nix b/krebs/5pkgs/simple/brain/default.nix index 9b125862b..bf52da75f 100644 --- a/krebs/5pkgs/simple/brain/default.nix +++ b/krebs/5pkgs/simple/brain/default.nix @@ -1,4 +1,4 @@ -{ pass, write, writeDash, ... }: +{ pass, runCommand, write, writeDash, ... }: write "brain" { "/bin/brain".link = writeDash "brain" '' @@ -9,4 +9,14 @@ write "brain" { PASSWORD_STORE_DIR=$HOME/brain \ exec ${pass}/bin/passmenu $@ ''; + "/share/bash-completion/completions/brain".link = + runCommand "brain-completions" { + } /* sh */ '' + sed -r ' + s/\<_pass?(_|\>)/_brain\1/g + s/\<__password_store/_brain/g + s/\<pass\>/brain/ + s/\$HOME\/\.password-store/$HOME\/brain/ + ' < ${pass}/share/bash-completion/completions/pass > $out + ''; } |