Questions about command completion in the Bash Unix shell.
Questions tagged [bash-completion]
310 questions
0
votes
1 answer
Why are my Homebrew bash completion paths suddenly missing?
Since my latest update of Homebrew, I'm suddenly getting the warnings below when attempting to set up path completion as I have always done, with commands (in my bash_profile) such as
source $(brew…

orome
- 45,163
- 57
- 202
- 418
0
votes
0 answers
Hitting when using vim/bash-completion is doing the same as the key
I have something wrong with my bash-completion when I try to use Vim on a file. I'm using Vim version 7.4.2334. When I hit Tab it has become the same as hitting Enter. The result is I get "command not found" errors instead of autocompletion when I…

YPCrumble
- 26,610
- 23
- 107
- 172
0
votes
1 answer
Auto complete commands with "windows like" options (starting with slash)
I'm trying to write a custom auto-complete script for zsh (or bash) for a command that has options starting with a slash.
For instance: MyCommand /foo=bar.txt /yolo=test /final=4
I've been trying to use the zsh helper _arguments but it did not…

magnetik
- 4,351
- 41
- 58
0
votes
1 answer
How to pop item from array in bash completion shell script?
I'm learning about bash completion. Here is my code:
_foo()
{
local cur prev opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
opts="push pull"
…

rishi kant
- 1,235
- 1
- 9
- 28
0
votes
1 answer
Excluding period for terminal autocompletion
I have a slight pet peeve when I try to compile and run my java programs in the terminal
javac example.java
When I want to run java example and use autocomplete on the java command, it automatically includes the period (java example.). Of course,…

Abundance
- 1,963
- 3
- 24
- 46
0
votes
6 answers
bash scripting - removing trailing chars from the end of a string
I have a string like that:
rthbp-0.0.3-sources.jar
And i want to get a new string called in someway (like string2) with the original string with just the version , so - '0.0.3' now rthbp- at the start will remain constant but after version "-"…

Scooby
- 3,371
- 8
- 44
- 84
0
votes
1 answer
Complete command options with quoted values
I am trying to write a Bash completion function for completing long command line options like --param1=value1. This works fine if value1 is not quoted. But in many cases value1 needs to be quoted, for example, --param1='Hello world'. In this case,…

Håkon Hægland
- 39,012
- 21
- 81
- 174
0
votes
1 answer
Tab-triggered snippets in shell
Is there a way to use tab key in bash or zsh to trigger a snippet, like e.g. Sublime Text does it?
For example, if I have configured that x should be expanded to ~/projects/one/two/x/, so:
$ cd x[TAB]
would turn into
$ cd ~/projects/one/two/x/

Frantic
- 1,179
- 11
- 25
0
votes
2 answers
How to add in bash for auto completion of arcanist commands
I am new to linux.
I am trying to set up arcanist.
I am done with git clone and adding the path in environment variable, however I am confused on how to set up the tab completion for arcanist commands.
In the arcanist user guide it says that you…

Mozak
- 2,738
- 4
- 30
- 49
0
votes
5 answers
Bash shell script to find out the missing file/newly added file in a directory
This program should run everyday so that if any file is missed or added, I can get a list of all those.
Please some 1 suggest possible way.

Jas
- 17
- 1
- 2
0
votes
2 answers
Where is the list of users returned from bash completion sourced from?
For example, typing compgen -u on an Ubuntu box returns a list of users. This includes more users than are listed in /etc/passwd . So the question is when using bash completion to list out users, where does the list come from?

user3866591
- 3
- 1
0
votes
1 answer
bash-completion for scp on a different port
I've installed bash-completion-20060301-1 which gives auto completion of remove directories when using scp.
The problem is that we have many servers that use ssh via port 26.
How can I modify the completion in order for it to note if a -P26 was…

Maxim_united
- 1,911
- 1
- 14
- 23
0
votes
1 answer
Pip bash completion not working on Mac Os X
I am on a Mac Snow Leopard, python is installed from homebrew and it's working, I have two custom bash completion script, one for pip and the other one for django. They used to work but they don't work anymore after messing up with my dotfiles.
The…

Leonardo
- 4,046
- 5
- 44
- 85
0
votes
1 answer
No bash completion with gcutil
I have just installed Google Cloud SDK, and I accepted the installation of bash completion, but I only have completion for gcloud and not gcutil.
Is it possible to have bash completion for gcutil too ? How ?
Thanks,

Samuel Phan
- 4,218
- 2
- 17
- 18
0
votes
2 answers
Strange autocompletion behavior in bash (Linux) using PATH variable with special symbol - apostroph (')
Well...I'm so confused, cause the only real problem in my case is freaking apostrophe (').
Situation: expanding PATH variable influence word completion, based on whether was apostrophes in additional path or not.
Example: I have an executable file…

mallniya
- 23
- 5