programmable completion function for shell aliases;
this project provides a tool which completes shell aliases automagically:
it works with all commonly used aliases (including self-aliases);
it uses a single function to complete all these aliases;
it completes aliases as you type it and press
install bash-completion, which is a dependency of this project;
there is a package
bash-completionin many linux distros; you can install it with a package manager:
dnf install bash-completion ## fedora apt install bash-completion ## debian
there are 2 different versions of
bash-completionhomebrew formulae; you should install version 2:
brew install bash-completion@2
cat bash_completion.sh >> ~/.bash_completion
add completion functions for your own shell aliases in
for example, to complete alias
foo, add a line:
complete -F _complete_alias foo
to complete an alias, type it and press
to complete alias
sctl, which is aliased to
# alias sctl='systemctl' # echo 'complete -F _complete_alias sctl' >> ~/.bash_completion # sctl <tab> add-requires add-wants cancel cat condreload ...
this project is expected to work with gnu bash(>=4.4) on linux;
support for older versions of bash is not tested;
support for other shells is not yet implemented;
support for macos and other operating systems is experimental;
The source code is licensed under the GNU General Public License v3.0.
Copyright (C) 2016-2018 Cyker Way
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.