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
2answers
187 views

remove a host from the completion list for ssh in zsh

I once had some hosts named 'myhost', 'myhost1', etc. And now all those except 'myhost3' become invalid. I removed those from /etc/hosts and ~/.ssh/known_hosts, but zsh still completes them for me. Is ...
5
votes
0answers
78 views
+50

Bash completion for comma-separated values

I would like to create completion rule for comma-separated parameters list. E.g. I have command which receives list of server names: myscript -s name1,name2,name3 At this moment I've managed to ...
3
votes
1answer
51 views

compgen warning: -C option not working as I expected

What is the correct way to use the compgen -C option? I'm trying to learn about Bash programmable completion, and in particular the compgen builtin function. I'm experimenting with the different ...
0
votes
1answer
28 views

Zsh ssh tab completion not working as expected on OS X

I use Zsh on two different machines (OS X and Ubuntu) and the tab completion for ssh does not work the same way. More specifically hosts specified in the file ~/.ssh/config is NOT used on OS X but it ...
3
votes
4answers
186 views

How to set proper monitoring of my services in a automated way? So that if one crash it auto on the fly restarts?

How can i setup monitoring to my system services? Either using automated script which scan every moment, if httpd, mysqld, and my custom daemon is running or not, if not running it will automatically ...
1
vote
0answers
41 views

how to edit and color bash's tab completion list

Following is what i would like to have. When the tab completion is ambiguous, and bash prints the list of possibilities. I would like it to colour the next character I should press inside every word ...
1
vote
1answer
60 views

Add arguments when completing a command name

I am looking for a way to expand some predefined strings in the terminal when tab (or another key combination) is pressed. This is different from tab completion. My terminal already expands ~ to my ...
2
votes
1answer
47 views

Completion of words on the screen as in VIM (Bash or Tmux)

How can I configure Bash or Tmux to complete the last matching identifier on the screen? Consider this common scenario: $ git fetch remote: Counting objects: 16, done. remote: Compressing objects: ...
-1
votes
1answer
581 views

Phrase Express Equivalent for Linux?

Is there some sort of auto text-insertion program with macros, similar to PhraseExpress for Windows in Linux?
6
votes
1answer
242 views

Need help on this bash auto completion script

I'm trying to setup autocompletion for a command, which takes only one parameter, a folder name, In /secure/kernel_builds/, I have the three following subfolder: 3.5.6/ 3.6.2/ source/ Now I want ...
3
votes
2answers
678 views

How to change the target directory for tab completion?

I found a short script to enable note-taking on onethingwell, which includes this: function n { nano ~/n/$1.txt } I'd like to extend it to do tab completion, so that if I want to edit the ...
4
votes
1answer
52 views

Force Bash normal tab completion if intelligent completion fails

Since tab completion became a standard feature in shells I have been a very happy user of it. I even like Bash's intelligent completion (where it only searches for PDF files, if I type evince ...
0
votes
1answer
29 views

ZSH autocompletion gives seemingly random errors after some time

My zsh autocompletion is broken in a strange way. For clean logins everything works but after some time I will get seemingly random autocompletion errors, for different "kinds" of autocompletion. ...
9
votes
2answers
688 views

Command line prediction

I've found an interesting paper: Predicting UNIX Command Lines about command-line prediction (based on user past activity), and I wonder if any actual implementation of such thing exists?
3
votes
0answers
45 views

Call vared and complete files from a different directory

I have the following zsh function which lets me edit symbolic links using the vared ZLE builtin. function lned { emulate zsh setopt err_return extended_glob local_options local_traps local -a ...
3
votes
1answer
42 views

Bash tab completion stop searching

When I am typing into bash and I press the "tab" key to auto complete, sometimes it takes a significant time. E.g., file IO to read directories takes >5 seconds, and thus I am hung waiting for IO to ...
1
vote
0answers
15 views

Manual tab completions in zsh

I would like nm[TAB] to expand to node_modules in zsh. Is this possible? How can it be done? Ideally, it wouldn't be triggered if there is another completion available, such as an already existing nm ...
6
votes
0answers
244 views

zsh: how to fix tab completion so it doesn't hide entries?

I'm using oh-my-zsh on Mac OS X with homebrew'ed zsh 4.3.12. I stumbled recently on a weird problem. In scripts/not-used I have several .R files: breakdowns.R eventloop.R ...
3
votes
1answer
36 views

Show completions under the prompt in Fish

Is there a way I can get the ultra compact auto-complete function from Zsh in Fish, so If I press Tab it won't write me all the possibilities permanently into my terminal but underneath the prompt?
4
votes
2answers
233 views

Command completion does not complete the files in the current directory

Something is wrong with my tab completion. Let's say I do this: cd test // works fine, go into test directory ls // works fine, displays all of the files Let's assume I have the following files: ...
2
votes
1answer
77 views

Bash autocompletion for an environment variable holding a directory name

I'm using, among other things, bash 4.2.37 on Linux Mint 14. When I autocomplete the name of an environment variable by typing Tab, it expands to the name of the variable followed by a space. If the ...
5
votes
2answers
129 views

How to order files by date in tab completion list

$ 7z l ~/Downloads/Tab How to make the resulting list to be sorted by date, not by name? I currently use special script to list N most recent files in a given directory (and copy the filename ...
1
vote
1answer
69 views

Variable name completion in ksh

While I am in bash , I am able to do a tab complete with environment variable names, but with ksh I am not able to do so. How can I get it done with KSH? I am using mksh with cygwin.
6
votes
1answer
38 views

Zsh auto complete suggest complete functions (_git _vim etc)

I have a small annoyance with how zsh is doing complete suggestions for my commands. If I type the beginning of a command that I don't have installed and press tab it will suggest the completion ...
1
vote
1answer
27 views

How can I add autocomplete for “gem which” with rbenv?

I am using rbenv on Mac OS X. I have autocomplete functionality already for the gem command: $ gem build environment lock query stale cert fetch ...
15
votes
0answers
278 views

Completing avfs fake directories in zsh

How can I tweak zsh's completion system to complete “fake” files in some circumstances? More precisely, the AVFS filesystem exposes archives as directories by creating a “fake directory” next to ...
1
vote
1answer
30 views

How to add all binaries to bash tab completion for some command?

I've installed program trickle that allow to throttle the net for specified command like: trickle -u10 -d10 <COMMAND> How to add bash completion for all binaries to trickle command?
3
votes
1answer
56 views

Tab completion of “../” in zsh

One noob question from a new zsh user: In bash, I can use tab-completion to move one directory up and descend down again another path. For example, suppose I'm in $HOME/folder1, and I want to cd to ...
3
votes
1answer
202 views

Enable Bash-Completion to expand Superuser executables to full path

I'm running OpenSUSE 12.3 (and have seen the behavior since 11), and have found that I can't call Superuser programs (e.g. shutdown, reboot) without using the full path. For me, many of these ...
1
vote
0answers
120 views

zsh completion installations (autojump) - How to use them?

I just installed autojump. I have included the log of the installation at the bottom of this post. Note that at the end it says: zsh completion has been installed to: ...
2
votes
3answers
137 views

How to add pattern to bash completion (for unzip)?

When I type unzip <tab> I get a list of all files ending in .zip, which is the standard behavior of tab completion for the unzip command. However, I also want bash completion for unzip ...
2
votes
1answer
75 views

Zsh completion of hadoop commands

Hadoop has a range of commands and subcommands to specify different operations on MapReduce, HFS etc. (e.g. hadoop dfs can be followed by any command from this list). Is there any way to enable ...
3
votes
1answer
46 views

zsh completion and unknow bzr commands

ZSH's Bazaar completion does not offer any expansion/completion when it does not know the bzr subcommand I am using. In my case, I use bzr qlog but ZSH's /usr/share/zsh/5.0.2/functions/_bzr does not ...
5
votes
2answers
774 views

How to debug and fix slow autocomplete in bash?

After a recent update (Ubuntu 12.04 LTS), TAB complete on the command line is slow. After entering a partial command (e.g evi [TAB]) or partial filename (e.g. evince somedocu[TAB]) the shell, ...
18
votes
3answers
5k views

How to enable autocompletion for remote paths when using scp?

I remote copied a file to my laptop using: scp someFile USER@192.168.178.32:/home/USER/put/it/some/where/oh/damn/you/here I want to be able to autocomplete the remote path by hitting tab.
3
votes
2answers
52 views

Guess complete filename

I have some files with really long names lying around on my server and writing the complete names is kind of a pita so I'm asking if my Linux system (Debian 7) can guess the complete filename? I want ...
3
votes
1answer
69 views

code review: automatic completion for bash aliases

I was reading How do I get bash completion for command aliases? and I thought, that the answer Shawn J. Goff needed a little something: less user setup so I wrote a little script that is intended to ...
3
votes
1answer
195 views

Trouble w/ bash programmable completion of filenames matching patterns

I've got a simple command named th. I've got a bash-completion file for it that goes as follows: _th() { COMPREPLY=() local curr=${COMP_WORDS[COMP_CWORD]} COMPREPLY=( $(compgen -f -X ...
4
votes
1answer
69 views

bash_completion for initscripts

I have writen my own initscript /etc/init.d/myscript. I can start and stop my script with the service command service myscript start service myscript stop When I type service <TAB>, ...
3
votes
2answers
386 views

How to enable local ~ autocompletion for scp?

Too late: The machine, OS and configuration in question is no longer in use, so I can't verify any more suggestions. I have not encountered this problem in Fedora or Arch Linux. If you are having this ...
3
votes
1answer
48 views

How to cd open / autocomplete a folder that ends in a specific phrase

I have a folder with subfolders named like this: 1122334 important things 1122335 less important things 1122336 notes 1122337 pictures of kittens etc The numbers at the beginning are date codes. ...
1
vote
1answer
67 views

How to globally enable all of Gentoo's bash completions at once?

eselect bashcomp enable unfortunately seems to lack a --all option, and I certainly don't want to manually activate each of the 194 entries. Can this be automated somehow, and set up such that ...
1
vote
2answers
105 views

Tab auto completion doesn't work with apt-get install (kubuntu)

I've noticed a strange behavior of my shell on Kubuntu. Auto completion doesn't work well when I try to install new software. It works only for default commands (when I type "apt-get inst" and I press ...
8
votes
2answers
689 views

Make zsh completion show the first guess on the same line (like fish's)

In Fish when you start typing, autocompletion automatically shows the first autocompleted guess on the line itself. In zsh you have to hit tab, and it shows the autocompletion below. Is there anyway ...
2
votes
0answers
39 views

ZSH and completion of files with newline characters

I am experimenting with ZSH on nasty file names, especially file names with the newline character in it. Here is how I create them: $ touch "filename<hit return here> 1" $ touch ...
1
vote
1answer
133 views

FreeBSD csh, TAB to show available choices?

I am a newbie to FreeBSD. How can i configure csh or tcsh to show available choices by pressing TAB twice, just like bash?
3
votes
1answer
55 views

How can I get Bash to display the auto-completion definitions for a given command?

I use module command to load and unload stuff to my environment, some of the machines I use have proper auto-completion others do not. I'm wondering if I it possible to know where the completion ...
2
votes
2answers
51 views

Make zsh show autocomplete choices even when a possible match is entered

On my current system (openSUSE 12.3 with zsh 5.0.2) the autocomplete function does not give me a choice of possible completions if I have already entered a possible completion match. For example, if ...
4
votes
1answer
45 views

Zsh completion that is insensitive between `_` and `-`

I don't like typing underscores, and would like to type a dash instead, and have zsh autocompletion treat it like it could be either a dash or an underscore. Is this possible with built-in zsh ...
7
votes
1answer
85 views

Disable Bash autocompletion for a specific command only

Is it possible to disable Bash's autocompletion for a specific command only? Use case: For obvious reasons, I would like to disable autocompletion for the rm command when I'm root. It would also be a ...