bash-completion Questions

1

Solved

Cannot get kubectl bash completion to work on Mac. I installed bash-completion with brew i.e. brew install bash-completion then as per the install notes, added it to the ~/.bash_profile: if [ -f $...
Knotted asked 3/9, 2015 at 20:0

1

I use Git on the command line. I often develop new features in git branches which are named after the Jira issues (Wikipedia: JIRA) related to them, e.g. branch "new-123" for Jira ticket "NEW-123"....
Marble asked 18/4, 2015 at 9:44

3

Solved

I'm running Ubuntu 11.04, and I'm seeing some odd behaviour when I try to use tab-completion in bash on a path that starts with a variable. If I've got TOP=/scratch, and I try to tab-complete: cd ...
Hypaethral asked 20/6, 2011 at 22:55

1

For example, there is bash-completion for rar on linux, I want to extend, make more completions for the same command - rar, maybe for my own filename extension, but I don't want to touch the alread...
Glossographer asked 9/4, 2015 at 18:16

1

Solved

I am writing a bash tab completion file for a utility that some times requires full URLs on the form: protocol://host:port. This contains two colons, which have proven to be problematic for tab com...
Douai asked 12/2, 2015 at 13:52

3

Solved

I used to be able to type the following: $> ./foo --arg=<TAB> Where foo is any program I wrote, and it would give me a list of files in the current directory, just like tab-completion norma...
Amphigory asked 4/12, 2013 at 1:54

1

I am writing a command line tool in python and using pip to distribute it. I have written some scripts (one for bash and one for zsh) to allow the tool to have tab completion. Is there a way to get...
Cindycine asked 22/9, 2014 at 18:34

1

Solved

I am trying to modify bash complete properties. I can exclude a file extension for a command thusly: complete -f -X '*hi' vim I want to specify two file names for exclusion. How do I do this? ...
Claudication asked 4/4, 2014 at 6:9

3

Solved

This may be have a better name than "custom tab completion", but here's the scenario: Typically when I'm at the command line and I enter a command, followed with {TAB} twice, I get a list of all f...
Clintonclintonia asked 8/6, 2012 at 4:2

2

Solved

I am using Git with git-completion and everything works fine with a single exception: when I do git p some_remote [TAB] I get as autocomplete suggestions the files in the current directory (wrong...
Cerebroside asked 26/11, 2013 at 12:33

1

Solved

I try to add a completion for the alias: alias m='man'. So, I added complete -F _man m to my .bashrc. The problem is that the function _man used for completing, isn't defined at the start of the b...
Bonilla asked 17/11, 2013 at 15:54

3

Solved

I'm working on a bash completion script for a dot file management utility. The tool has a command dots diff [filename] that will show the difference between the installed dot file and the source do...
Leitmotif asked 3/11, 2013 at 11:52

1

Solved

The cmdArgs package for Haskell provide command option parsing. based on this page from the docs http://hackage.haskell.org/packages/archive/cmdargs/0.10.3/doc/html/System-Console-CmdArgs-Explici...
Weig asked 31/5, 2013 at 18:6

1

Say I have a folder with files in it with names like this: log_1.log log_2.log log_2.gz And I want to perform some operation, let's say move, on log_2.gz. In Windows cmd.exe, I am used to perf...
Daladier asked 29/5, 2013 at 5:4

4

Solved

I have the following directory structure: /home/tichy/xxx/yyy/aaa /home/tichy/xxx/yyy/aab /home/tichy/xxx/yyy/aac I would like to enter cdw y<TAB> and get cdw yyy/<CURSOR> as a resul...
Forefinger asked 14/12, 2011 at 10:42

1

Solved

I have a command line tool which takes arguments in an three-part form: $ t first_second_third I have a set of valid values for first, a set of valid values for second, and a set of valid values...
Optime asked 28/4, 2013 at 0:50

2

I would like to get auto-completion on my python scripts also in the arguments. I had never really understood how the bash_completion worked (for arguments), but after I digged in I understood tha...
Fibrilliform asked 5/12, 2011 at 15:48

2

Solved

Is there any bash_completion script ready for Rails 3?
Mailbag asked 2/10, 2010 at 21:30

1

Solved

There is something confuse me when I implement a bash auto-completion function which I'll put it in /etc/bash_completion.d/ In order to achieve some feature, I want to remove the word break charac...
Jeffersonjeffery asked 10/5, 2012 at 6:40

2

I'm building a bash completion script for a tool which shares file uploading semantics with curl. With curl, you can do: curl -F var=@file to upload a file. My application has similar semantic...
Leucippus asked 8/5, 2012 at 6:16

2

Solved

I would like to write a Unit Test for a (rather complex) Bash completion script, preferrably with Python - just something that gets the values of a Bash completion programmatically. The test shoul...
Capitalistic asked 4/2, 2012 at 0:18

1

Solved

I'm creating a function to provide programmable completion for a command that I use (with much help from http://www.debian-administration.org/articles/317). The shell script usage is as follows: s...
Propjet asked 12/4, 2012 at 18:40

2

Solved

In a bash completion script, suppose COMPREPLY=(aa/ba/ aa/bb/). When the script is invoked, the completion options looks like this to the user: $ foo aa/b<TAB> aa/ba/ aa/bb/ However, I wan...
Koal asked 17/10, 2010 at 1:44

2

I'm trying to construct a bash completion routine that will suggest command lines flags and suitable flag values. For example in the below fstcompose command I would like the competition routine to...
Giorgia asked 18/2, 2011 at 11:44

1

Solved

I use cur="${COMP_WORDS[COMP_CWORD]}" opts=`sqlite3 test.db "${QUERY[COMP_CWORD]}"` SAVEIFS="$IFS" IFS=$'\n' COMPREPLY=( $(compgen -S"'" -P"'" -W "${opts}" $cur) ) IFS="$SAVEIFS" to get p...
Feoff asked 18/1, 2012 at 21:12

© 2022 - 2024 — McMap. All rights reserved.