Install aliae completion using profile files

This commit is contained in:
Manuel Thalmann 2024-03-20 19:35:46 +01:00
parent b3c1c20b72
commit eaf9ed7f8a
3 changed files with 12 additions and 10 deletions

View file

@ -14,12 +14,3 @@ script:
Get-Item $profilePath | ForEach-Object { . $_; };
}
if: match .Shell "pwsh"
- value: |
eval "$(aliae completion bash)"
if: match .Shell "bash"
- value: |
aliae completion fish | source
if: match .Shell "fish"
- value: |
aliae completion powershell | Invoke-Expression
if: match .Shell "pwsh"

View file

@ -2,3 +2,4 @@
. "$PSScriptRoot/../powershell/lib.ps1";
Add-PowerShellProfileStatement -Statement "# aliae`naliae init pwsh | Invoke-Expression";
Add-PowerShellProfileStatement -Statement "# aliae`n$(Get-ScriptInitializer "aliae completion powershell")";

View file

@ -9,15 +9,25 @@ function dump_header() {
echo "# aliae";
}
{
function dump_bash() {
echo "#!/bin/bash";
dump_header;
}
{
dump_bash;
echo "export ALIAE_CONFIG='$configPath'";
} | sudo tee /etc/profile.d/aliae.sh > /dev/null;
{
dump_header;
echo "aliae init fish | source";
echo "aliae completion fish | source";
} | sudo tee /etc/fish/conf.d/aliae.fish > /dev/null;
{
dump_bash;
echo 'eval "$(aliae completion bash)"';
} | sudo tee /etc/bash/conf.d/aliae.sh
popd > /dev/null;