A feature provided by interactive programs such as shells and text editors that inserts text to complete a word or phrase that the user is likely intending to compose.

learn more… | top users | synonyms (2)

1
vote
0answers
22 views

Bash completion - How to get filename completion for suboptions

I have a function which can take main arguments and then sub-arguments. Some of these sub-arguments are filenames. The current completion code I have is as follows. _scm() { local cur prev opts ...
2
votes
1answer
42 views

Install an additional completion function for bash

I have never used bash completion of todo.txt cli; however, I have decided to give it try. On the author's github, it says: (Optional, since v 2.9:) Install the Bash completion, either system-wide, ...
1
vote
2answers
44 views

Bash autocomplete: does not list files or directories

In my bash terminal, I would usually press tab twice to get the file and folder list. For instance cat 2XTAB would list all files and folders in the present directory and cd Proj2XTAB would list all ...
1
vote
0answers
35 views

Making zsh filename completion case-insensitive everywhere

I have the following line in my zshrc to make filename completions case-insensitive: zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' This works most of the time but I’ve noticed that if I ...
-1
votes
0answers
32 views

Is there any Centos package that autocompletes the commands with arrows?

In my Mac's Terminal, pressing ↑ autocompletes any word, e.g. when I type ssh + ↑ it autocompletes to the last ssh I've used. But in my Centos 7 VPS, when I press ↑, it always overwrites to the ...
3
votes
1answer
34 views

Zsh gpg2 autocompletion

I am using zsh with oh-my-zsh on OSX. I installed gnupg2 from homebrew giving me the executable gpg2. Unfortunately zsh auto completion appears to only support gpg (even though that executable is not ...
0
votes
0answers
31 views

zsh git command auto-complete add extra origin to the git branch name

After I clone a git repository locally, I want to switch branch to, says, 'ABCD'. $ git branch -a * master remotes/origin/ABCD remotes/origin/HEAD -> origin/master remotes/origin/master $ ...
0
votes
0answers
9 views

Specify “any sequence of digits” to ‘compgen’

How can I get compgen to return matches for “any valid sequence of digits”? The Bash compgen command is used to generate completion matches in Bash programmable completion. There are many options for ...
4
votes
1answer
147 views

Can the command completion for `cd` be modfiied to only show directories and ignore files?

When I am in a directory in bash, and I press cd Space Tab, it shows everything in the directory as a possibility. (Show all 1000 possibilities?) This is really cumbersome when I am in a directory ...
2
votes
1answer
47 views

Combining zsh’s tab completion with case insensitivity

I have zsh 5.0.7 configured to use case-insensitive tab completion with zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' The problem I’m having is that this case insensitivity often leads ...
1
vote
1answer
79 views

I want to create a cron job that runs a command on a remote linux box using ssh but I want ssh to answer password [duplicate]

Thank you for the reply.This is not what I am after. The ssh from server 0 to (1,2,3) (no password) but a remote script on server (1,2 & 4 ) which starts a service/application needs a password for ...
3
votes
2answers
52 views

Seeing file names in SCP

I'm using scp to copy files from a remote server to a local one. What's really uncomfortable is that I need to type the file path precisely. I'm used to relying on autocompletion, because file names ...
1
vote
0answers
37 views

Autocomplete issue in bash with equal sign (=)

I am trying to make autocomplete work and wroted a piece of code to demonstrate an issue I faced up: $ cat completion.sh function _completion_command() { compopt +o bashdefault +o default +o ...
1
vote
0answers
43 views

How can I complete a -N numeric parameter?

I'm writing an autocomplete script for supervisorctl. Is it possible to complete a numeric parameter such as -6, -999 etc? Currently my call to _arguments looks like, which doesn't work: _arguments ...
12
votes
1answer
239 views

How can I loop over possible completions? [duplicate]

I'd like to be able to get my hands on an array of possible completions for a given partial command. For example, the partial command service um has the following possible completions: $ service ...
1
vote
1answer
45 views

Broken git autocompletion after I have overridden the git command

Recently git branch <tab> started showing me the following error: $ git branch bash: -c: line 0: syntax error near unexpected token `(' bash: -c: line 0: `/usr/bin/git --git-dir=.git ...
2
votes
3answers
82 views

How to get tab completion when using curly braces in Bash

I want to have tab completion when using curly braces in a command in bash. For example: cp ~/html/{foo bar.txt whatever} /var/www/html/ I want the tab completion for the files stated in the curly ...
4
votes
1answer
133 views

Tab autocompletion of accented characters with oh-my-zsh doesn't work

I am not able to properly display autocompleted filenames that contain accented characters like ã in my shell configuration of zsh and oh-my-zsh. I've created a filename cão.txt to demonstrate this ...
1
vote
2answers
73 views

Zsh completion on the second command or after an alias?

I have changed my OS X Yosemite shell to Zsh and configured with "oh my zsh" plugins, recently i installed proxychains-ng to proxy command line tools, but i found zsh completion does not work on the ...
2
votes
1answer
138 views

How to remove a filename from bash completion, based on its suffix?

Apologies if this is a duplicate, but I'm (unsuccessfully) trying to edit the bash completion options for vim. Specifically, when editing a LaTeX document, there are lots of supplementary files which ...
1
vote
1answer
39 views

When using zsh tab-completion, Ignore CDPATH if a local file or directory matches

I love Z shell's tab completion with CDPATH, but sometimes it's overkill. I'd like it to only kick in as a fall-back if nothing in the local directory matches. For instance, I was just in ...
3
votes
1answer
42 views

Keep the space after completion for some characters in zsh

Zsh has a bit of completion-related automation that's nice most of the time: after pressing Tab, a space is inserted automatically (or some other appropriate character such as , inside braces). I ...
2
votes
2answers
71 views

Autocomplete of a file name in bash prompt

I usually put a date before a file or directory name similar to 2014-04-20 file_name.doc. So, in a folder there is usually a bunch of files and directories starting with a date. But when accessing ...
2
votes
1answer
36 views

How to associate exstension with program so that it works with tab complete

I use texmaker to edit my LaTeX (.tex) documents. I also use texmaker for other things, but 90% of the time I just want to open a .tex document. If I want to open document.tex, I usually just write ...
2
votes
0answers
23 views

Escaping output in tcsh completion by program

How do I escape output in the program providing completion? Suppose: tcsh% complete foo 'p/*/`mycomp`/' And mycomp is a Perl program printing this: #!/usr/bin/perl print "one\n"; print "two ...
2
votes
1answer
32 views

tcsh completion questions

I come from bash and am looking into tcsh's tab completion feature. 1) Is it correct that tcsh cannot delegate completion to a shell function (the way bash does with 'complete -F _func cmd')? 2) ...
1
vote
2answers
58 views

bash completion: how to complete a list of hosts for a specific argument?

My programm can have the following format: <command_name> <arguments> <options> -hosts <host1> <host2> ... <hostn> (<more_arguments>) ... I am trying to set ...
2
votes
1answer
359 views

oh-my-zsh style completion for directory/file paths without oh my zsh

I had oh-my-zsh installed for a while, and I could type a full path using only one letter, then press tab to case-insensitively autocomplete the whole thing. For example, if I had a file at ...
1
vote
1answer
121 views

Is there anyway to get COMPREPLY to be output as a vertical list of words instead in a single line?

COMPREPLY by default returns a space separated list of words, but I'd like to have it return a single word per line. I've tried putting newlines at the ends of the words and have looked through the ...
1
vote
1answer
52 views

Modify bash autocomplete rule to exclude particular file names

I want to modify the existing vi bash autocompletion rule to exclude some filenames (for example, the config.log file). I tried using the FIGNORE environmental variable, but that didn't work. Using ...
2
votes
0answers
87 views

Assign both menu-complete and dynamic-complete-history to TAB

Is there a way for me to assign both menu-complete and dynamic-complete-history to Tab (or one to Tab and the other to Tab-Tab) in .inputrc? I'm thinking there might be a way to setup a function and ...
1
vote
1answer
114 views

How to get the equivalent of tcsh's enhanced completion in bash?

In the tcsh manpage, the effects of set complete = enhance are defined as follows: [...] completion 1) ignores case and 2) considers periods, hyphens and underscores ('.', '-' and '_') to be word ...
1
vote
1answer
33 views

Cannot get 'match-hidden-files' to work

I have been trying to get 'match-hidden-files' to work on bash 4.3.11, but I can't. I wanted to make sure it's not something I'm doing wrong. $ grep match-hidden-files .inputrc set ...
2
votes
1answer
73 views

why completion does not work for all aliases?

In my .bash_aliases file I have couple of aliases, like -- shopt -s expand_aliases alias emx='emacs' alias em='emacs -nw' alias gv='gvim' alias v='vi' alias ev='evince' when I use them and press ...
0
votes
1answer
124 views

Auto code completion in GEdit and VIM, for C++

Being a Visual Studio fan, I am just wondering if I can have same feature in GEdit and VIM. PS : I’m new to VIM and currently using CentOS and Ubuntu.
1
vote
2answers
49 views

Auto-Complete and Shortcut Keys for Linux

I'm looking for something that will allow me to type anywhere, on anything and for this software to auto-complete. I used FastKeys on Windows which would also allow you to do custom shortcuts to open ...
1
vote
0answers
35 views

Autocomplete include directories in c++

VisualStudio has some extension which checks the include directories and makes suggestions while typing. My current project uses a lot of included libraries, sometimes with rather long pathnames. ...
0
votes
2answers
307 views

Select an item in vim autocomplete list without inserting line break

A rather annoying feature of vim is that if you are in insert mode and do an autocomplete (Ctrl-N), arrow key down to the desired item, and press the Enter key, then it inserts the item but also ...
2
votes
1answer
148 views

Stop zsh from completing parent directories

I am using zsh with grml's zshrc as a base. As part of my work I access network path regulary (e.g NFS. AFS.) If I write /a/long/network/path/on/the/other/side/of/the/world press TAB twice it is ...
17
votes
3answers
335 views

Disable tab completion in Bash for some directory that contains a large number of files?

I'm working with large number of files, which I keep in a directory. Every time I go in to that directory and accidentally press Tab twice, it takes too long (may be over a minutes) to show files that ...
5
votes
3answers
361 views

How do I auto complete a command from the command history? [duplicate]

Is there a key combination for bash to auto compete a command from the history? In ipython and matlab for example this is achieved by pressing up arrow after typing a few characters.
2
votes
1answer
122 views

How can I keep the trailing slash after choosing a directory from the zsh completion options?

In zsh, when I press tab 2 times to enter the "completion menu", select a directory and press enter, it first adds the chosen directory with a trailing slash to the command, but as soon as I press ...
4
votes
2answers
126 views

Where do bash completion functions come from?

I have a Raspberry Pi running Raspbian (Debian Wheezy). I entered set in a terminal and was surprised by the long list. This seems to be almost entirely git functions — ~3700 lines of them. ...
1
vote
1answer
102 views

Custom tab-completion in bash's `read`

Is there a way to "import" a list of words into bash's read builtin to have custom tab-completion? I've been writing a wrapper script for suckless' minimalist irc client "ii", and I don't have a way ...
0
votes
1answer
219 views

Add autocompletion in dash

Is it possible to get at least "some" autocompletion in a dash shell like in bash? At least for the existing filenames in a path.
4
votes
1answer
108 views

can we use something better than more for tab completion?

more is not as convenient as less. Is it possible to use something better than more for tab completion, when ls and then tab? Thanks.
4
votes
3answers
188 views

Why can't I use tab expansion/auto-complete of shell variables with cd?

I have setup a variable in .bashrc: export SOME_DIR=/path/to/some/dir Now, with ls I can type ls $SOME_DIR[tab] and the variable will be expanded, and I can then use tab for auto-completion when ...
3
votes
3answers
95 views

Hide make targets from shell when users autocomplete in bash

Is there a way to flag some targets in a Makefile so that they don't appear at all in the shell when the user types make and then presses Tab ? I am having a Makefile with too many recipes and I don't ...
1
vote
1answer
74 views

Is autocompletion for applications done by shell?

When I type evince, and then hit tab, the bash shell will list all files that can be opened by evince, which seems to be based on the ext part of the filename. Is this done by shell or the ...
2
votes
1answer
104 views

zshell is tab-completing ambiguous options

I've been having an issue with zsh completion that's becoming a rather large annoyance. It's completing options beyond where there is ambiguity. For example, in a directory with these files: ...