Questions about command completion in the Bash Unix shell.
Questions tagged [bash-completion]
310 questions
-1
votes
1 answer
Zsh completion caching policy explained
I'm writting some zsh functions using the powerful completion feature. The computation of my completions take some times and I want to make use of the completion caching policy. From the zsh manual…

Brice.S
- 47
- 6
-1
votes
1 answer
Compgen and make: is there a way to compgen the make recipes?
I am running compgen -c make in BASH on mac and am getting the following return values:
makepqg
makepqg
makepqg
make
makeinfo
makepqg
makepqg
But what I want and should? be getting (and do get when completing) is:
foo
bar
biz
baz
Which represent…

Chris
- 28,822
- 27
- 83
- 158
-1
votes
3 answers
Non variable recognition on Syspass API Bash Script
When i input a variable on the curl with the json indexed, it takes the string value of the variable, if i scaped the double-quotes, it returns me a sintax error because of in a json request u have to input the data with…

forzax hx
- 3
- 2
-1
votes
1 answer
Bash: How to find a specific char in a string
I have the assignment to write a bash script to validate password strength and one of the requirements is:
Include both the small and capital case letters.
The Password variable is the input, of course, one of the requirements to validate the…

Eylon Levi
- 3
- 2
-1
votes
1 answer
Bash Completion only from beginning (^...$)?
I've wrote a simple bash completion script to complete ssh servernames from a list, eg:
_ssh()
{
local cur prev opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts=$(cat $hosts | awk -F';'…

jonny
- 9
- 6
-1
votes
1 answer
I want to input variable like string bash
I want input file like -
a="Hello"
echo "$a ${foobar}"
Output i get is -
Hello
But i want output like this -
Hello ${foobar}
How can i accomplish this is bash script?

Chetan Nahar
- 3
- 2
-1
votes
1 answer
How to enable bash-completion xrdp lxde
It maybe evident for many people but for me wasn't.
So to enable bash-completion or in other words auto-completion or auto-fill in Linuks OS, Debian or Kali or Ubuntu combine with xlde Desktop Environment and xrdp remote connection…

croonx
- 139
- 1
- 6
-2
votes
1 answer
how to print An array on the same line
I am reading a file which contains the following config as an array:
$ cat ./FILENAME
*.one.dev.arr.name.com
*.one.dev.brr.name.com
*.one.dev.sic.name.com
*.one.dev.sid.name.com
*.one.dev.xyz.name.com
*.one.dev.yza.name.com
The array is…

mac
- 1,479
- 3
- 11
- 21
-3
votes
1 answer
I write a bash file using tab-completion by complete command, but in zsh it didn't work
source code:
#!/bin/bash
complete -W 'word1 word2 word3 aa bb' ./test.bash
echo "the param is: $1"
When I run ./test.bash , turns out the file list of current dir.
complete command doesn't work in zsh??

fujian26
- 70
- 7
-4
votes
2 answers
How to run a bash script via absolute path?
I've already posted this question here:
https://superuser.com/questions/1067609/how-to-run-a-bash-script-via-absolute-path
But I hope that maybe If I duplicate it here, I will get my answer sooner :)
I have a…

Danylo Volokh
- 4,149
- 2
- 33
- 40