Merge pull request #1 from justinwoo/bash-completions

bash completions for dhall executables
This commit is contained in:
Justin Woo 2018-12-12 15:56:27 +02:00 committed by GitHub
commit 9e3b8744db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 5 deletions

View file

@ -12,6 +12,10 @@ pkgs.stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/bin
install -D -m555 -T dhall-to-bash $out/bin/dhall-to-bash
DHALL_TO_BASH=$out/bin/dhall-to-bash
install -D -m555 -T dhall-to-bash $DHALL_TO_BASH
mkdir -p $out/etc/bash_completion.d/
$DHALL_TO_BASH --bash-completion-script $DHALL_TO_BASH > $out/etc/bash_completion.d/dhall-to-bash-completion.bash
'';
}

View file

@ -12,7 +12,13 @@ pkgs.stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/bin
install -D -m555 -T dhall-to-json $out/bin/dhall-to-json
install -D -m555 -T dhall-to-yaml $out/bin/dhall-to-yaml
DHALL_TO_JSON=$out/bin/dhall-to-json
DHALL_TO_YAML=$out/bin/dhall-to-yaml
install -D -m555 -T dhall-to-json $DHALL_TO_JSON
install -D -m555 -T dhall-to-yaml $DHALL_TO_YAML
mkdir -p $out/etc/bash_completion.d/
$DHALL_TO_JSON --bash-completion-script $DHALL_TO_JSON > $out/etc/bash_completion.d/dhall-to-json-completion.bash
$DHALL_TO_YAML --bash-completion-script $DHALL_TO_YAML > $out/etc/bash_completion.d/dhall-to-yaml-completion.bash
'';
}

View file

@ -11,6 +11,10 @@ pkgs.stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/bin
install -D -m555 -T dhall $out/bin/dhall
DHALL=$out/bin/dhall
install -D -m555 -T dhall $DHALL
mkdir -p $out/etc/bash_completion.d/
$DHALL --bash-completion-script $DHALL > $out/etc/bash_completion.d/dhall-completion.bash
'';
}

View file

@ -12,6 +12,10 @@ pkgs.stdenv.mkDerivation rec {
installPhase = ''
mkdir -p $out/bin
install -D -m555 -T dhall-to-text $out/bin/dhall-to-text
DHALL_TO_TEXT=$out/bin/dhall-to-text
install -D -m555 -T dhall-to-text $DHALL_TO_TEXT
mkdir -p $out/etc/bash_completion.d/
$DHALL_TO_TEXT --bash-completion-script $DHALL_TO_TEXT > $out/etc/bash_completion.d/dhall-to-text-completion.bash
'';
}