Install aliae
completion using profile files
This commit is contained in:
parent
b3c1c20b72
commit
eaf9ed7f8a
3 changed files with 12 additions and 10 deletions
|
@ -14,12 +14,3 @@ script:
|
||||||
Get-Item $profilePath | ForEach-Object { . $_; };
|
Get-Item $profilePath | ForEach-Object { . $_; };
|
||||||
}
|
}
|
||||||
if: match .Shell "pwsh"
|
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"
|
|
||||||
|
|
|
@ -2,3 +2,4 @@
|
||||||
. "$PSScriptRoot/../powershell/lib.ps1";
|
. "$PSScriptRoot/../powershell/lib.ps1";
|
||||||
|
|
||||||
Add-PowerShellProfileStatement -Statement "# aliae`naliae init pwsh | Invoke-Expression";
|
Add-PowerShellProfileStatement -Statement "# aliae`naliae init pwsh | Invoke-Expression";
|
||||||
|
Add-PowerShellProfileStatement -Statement "# aliae`n$(Get-ScriptInitializer "aliae completion powershell")";
|
||||||
|
|
|
@ -9,15 +9,25 @@ function dump_header() {
|
||||||
echo "# aliae";
|
echo "# aliae";
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
function dump_bash() {
|
||||||
echo "#!/bin/bash";
|
echo "#!/bin/bash";
|
||||||
dump_header;
|
dump_header;
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
dump_bash;
|
||||||
echo "export ALIAE_CONFIG='$configPath'";
|
echo "export ALIAE_CONFIG='$configPath'";
|
||||||
} | sudo tee /etc/profile.d/aliae.sh > /dev/null;
|
} | sudo tee /etc/profile.d/aliae.sh > /dev/null;
|
||||||
|
|
||||||
{
|
{
|
||||||
dump_header;
|
dump_header;
|
||||||
echo "aliae init fish | source";
|
echo "aliae init fish | source";
|
||||||
|
echo "aliae completion fish | source";
|
||||||
} | sudo tee /etc/fish/conf.d/aliae.fish > /dev/null;
|
} | 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;
|
popd > /dev/null;
|
||||||
|
|
Loading…
Reference in a new issue