bash-completion Questions
9
I installed Cygwin on windows and one of the default packages is git tab completion, but I don't have tab completion.
I did some searching and found a note saying it isn't enabled by default. I co...
Onionskin asked 10/9, 2013 at 15:20
8
I followed the instructions for installing Bash completion as given by kubectl completion -h:
I installed bash-completion via Homebrew
In my ~/.bashrc, I first source bash-completion then output ...
Bray asked 21/7, 2017 at 15:0
2
Solved
Is it possible to get command-line autocompletion of python -m package.subpackage.module?
This is similar to, but not the same as, python ./package/subpackage/module.py, which does autocomplete t...
Ehrlich asked 12/11, 2018 at 20:13
5
Solved
The following bash completion passes an array of possible words (i.e. completions) to compgen.
basenames=("foo" "fu bar" "baz");
COMPREPLY=($(compgen -W "${basenames[*]}" -- "${COMP_WORDS[COMP_CW...
Agone asked 18/5, 2012 at 12:17
8
Solved
No matter what I try and do I can't seem to make git tab/auto completion work in my zsh shell. I've downloaded the bash-completion script and the zsh-completion one and followed the instructions, b...
Blackthorn asked 1/7, 2014 at 15:20
2
Solved
Inside my Bash script, I'm reading some variables entered by the user with read:
read -p "Glassfish Path:" GF_DIR
Now I want that the user gets a autocompletion when he has to enter a directory,...
Jussive asked 27/1, 2011 at 17:38
4
I have rustup+rust+cargo installed using the official installation script.
How do I enable shell completions, to be able to type cargo <TAB> in the terminal and see the possible commands such...
Hogwash asked 14/7, 2022 at 16:17
6
Solved
I'm making a bash script which presents a command line to the user.
The cli code is as this:
#!/bin/bash
cmd1() {
echo $FUNCNAME: "$@"
}
cmd2() {
echo $FUNCNAME: "$@"
}
cmdN() {
echo $FUNCN...
Strangury asked 18/1, 2011 at 16:52
8
Solved
Suppose I have a simple makefile like:
hello:
echo "hello world"
bye:
echo "bye bye"
Then in bash I want something like:
make h < tab >
so it can complete to
make hello
I found a...
Incendiarism asked 15/11, 2010 at 20:4
5
Solved
I'm having a problem with bash-completion when the possible options may contain spaces.
Let's say I want a function which echoes the first argument:
function test1() {
echo $1
}
I generate a l...
Valerle asked 22/10, 2014 at 13:59
3
Solved
I currently have a Bash completion file which completes a single parameter from a list of allowed commands for a script called pbt. This is the working Bash completion file:
_pbt_complete()
{
loca...
Mellisa asked 14/3, 2011 at 18:18
3
Solved
I have implemented some perl scripts and in some cases i have to pass some command line args into my program.Usability perspective i have decided to add some bash completion script into my project....
Nesta asked 15/7, 2017 at 6:34
4
Let's say I have these variables defined in my bashrc:
i='cgi-bin/internal';
e='cgi-bin/external';
f='cgi-bin/foo';
b='cgi-bin/bar';
ad='cgi-bin/admin';
#etc...
When I use the variable on t...
Leggett asked 8/2, 2011 at 19:51
2
Solved
I'm wanting to customize the BASH completion functionality of my Python Click CLI program to include not only the commands / subcommands of the script, but also objects that the script creates.
Le...
Execrable asked 11/9, 2018 at 18:32
3
Solved
Inside my Bash Completion file, i'm looking up completion-strings by an external script, which takes some time (1-2 seconds). Since these strings mostly stay the same for the rest of the time the c...
Watermark asked 16/3, 2011 at 15:36
3
Solved
builtin completion
The default completion for git clone (reproduced below) gives tab completion for --* options:
_git_clone ()
{
case "$cur" in
--*)
__gitcomp_builtin clone
return
;;
esac
}...
Hildagarde asked 22/8, 2018 at 17:46
1
Solved
Background
I have successfully configured Bash completion for various Git aliases. For example:
$ git config alias.subject
!git --no-pager show --quiet --pretty='%s'
$ function _git_subject() { _gi...
Sherrard asked 31/3, 2021 at 15:24
1
I have a bunch of bash completion files in
/usr/local/etc/bash_completion.d
most of the scripts in there have something like this at the bottom of them:
complete -F _tmux tmux
the above is fo...
Glottis asked 31/5, 2019 at 5:14
3
Is there a way how to control completion for first command being typed on bash4 command prompt?
I can control completions for "empty line" with complete -E, but as soon as some characters are type...
Loupe asked 4/5, 2012 at 13:56
3
Solved
In my .bash_profile, I have a lot of functional shortcuts for git. For example:
function gitpull() {
branch="$1"
if [[ -z $branch ]]; then
current_branch=`git symbolic-ref -q --short HEAD`
gi...
Infer asked 11/10, 2017 at 19:33
3
Solved
I'm trying to write a small command launcher application, and would like to use bash's tab completions in my own completion system. I've been able to get a list of completions for general commands ...
Grenoble asked 19/8, 2010 at 10:41
3
Consider this one-liner to activate bash completion for foobar:
complete -F _known_hosts foobar
This shows a list of completion options for
> foobar <TAB> <TAB>
but not for
&g...
Dorser asked 7/12, 2016 at 13:6
1
Solved
I created a command memo as follows:
memo() {
vi $HOME/memo/$1
}
I want to apply bash-completion to my memo to open files that is already in $HOME/memo directory:
$ memo [TAB] # to show files in ...
Hus asked 19/7, 2020 at 11:56
1
I'm trying to provide a bash completion script for my CLI tool that is written in Python. According to the Python Packaging Authority, data_files in setup.py is exactly what I need:
Although con...
Alabama asked 17/3, 2019 at 14:46
1
GNU advises to use --name=value syntax for passing argument for long option. It enables a long option to accept an argument that is itself optional.
Suppose you have a complete set of possible arg...
Beaufort asked 29/9, 2019 at 15:31
1 Next >
© 2022 - 2024 — McMap. All rights reserved.