a feature provided by interactive programs such as shells and text editors that inserts text in order to complete a word or phrase that the user is likely intending to compose
0
votes
2answers
36 views
TAB autocomplete on sudo sh
When I say sudo sh, TAB stops working as autocomplete signal on my Debian.
How can I enable TAB key autocomplete after I say sudo sh ?
3
votes
2answers
62 views
How do I let bash autocomplete wildcards?
If I have directory containing the files
foo.bar.a.cat
foo.bar.a.hat
and I type ls f+TAB the bash shell autocompletes to ls foo.bar.a.. If I type ls *bar*+ TAB I would like it to autocomplete to ...
3
votes
1answer
59 views
Tab completion doesn't work for arguments when command is an alias
I have an alias, ee, defined for my favorite editor, mg. When I do something like
mg fo
and then hit tab, if a file foo exists, I get tab completion to:
mg foo
On most systems I use (e.g., all ...
2
votes
1answer
39 views
Bash remote autocompletion : change the 'starting' directory
I'm regularly downloading files from a remote server, always from the same directory. So I wrote a custom function that I put in my bashrc:
download_from_myserver () {
for file in "$@"
do
...
3
votes
1answer
31 views
Ignore files for zsh's completion for SVN
I managed to configure zsh such that it does not suggest LaTeX temporary files when I use autocompletion for emacs by adding this line to my ~/.zshrc:
zstyle ':completion:*:*:emacs:*:*files' ...
2
votes
4answers
45 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
1answer
22 views
Set auto completion for a new filetype
I have a file, which contains lines of function name, now I want to use them for code auto completion, and only for file names end with .XXX.
How should I do it, is it possible to work with ctags or ...
2
votes
3answers
98 views
How to turn off the beep only in bash tab-complete
I find the beep useful for some things, so I only want to turn it off for tab completion (I'm not asking how to completely turn it off, that has already been answered in a different question on ...
0
votes
0answers
32 views
How to mimic bash tab completion behavior on OS X when using Linux
I'm an OS X user who's used to ssh'ing into various Linux machines. Recently, I installed Ubuntu on one of our servers and have noticed very different tab completion behavior in bash. Among other ...
3
votes
1answer
35 views
Is there an easy way to change bash suggestions?
I've noticed that some console commands (like sudo or xargs) are using different kind of suggestions when I press Tab (they suggest programs instead of files).
Is there a way to mimic that kind of ...
0
votes
1answer
25 views
Why is vim offering me spelling suggestions instead of using the completefunc?
I am trying to set up vim for writing email. I have a plugin to provide autocompletion of email addresses (notmuch abook ). If I do :set completefunc it tells me it is CompleteAddressBook as ...
1
vote
1answer
38 views
Directory stack order in zsh
I am working on Zsh 5.0.2 (latest stable version), and I noticed that:
dirs -v
and
cd -<TAB>
show a different list of directories (or at least directories in different order).
Moreover, ...
2
votes
1answer
40 views
Autocompletion of email addresses in vim
I'm playing around with various bits of an email solution, including notmuch and alot. I write my emails in vim and I'd like to have tab completion of email addresses while writing email. Is there a ...
2
votes
0answers
71 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, ...
4
votes
4answers
67 views
Bash-completion and grep
I installed a program (iftop) on Debian Squeeze but some days ago I forgot it's name.
I had only this information about the program:
1) It was called *top
2) I could find it using bash-completions.
...
2
votes
2answers
106 views
How to implement package install suggestion on Debian?
I have noticed that while on Ubuntu, if I type the following:
mc
and it isnt installed, I get the message below:
The program 'mc' is currently not installed. You can install it by typing: sudo ...
1
vote
2answers
64 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 ...
4
votes
2answers
59 views
Check argument before program run
I have noticed that, when I type unzip in bash and press tab, auto-complete works only on files with .zip extension. How is that done? What if I would like to make program that would accept only image ...
0
votes
1answer
59 views
Vim - Tabs in :o Show up as ^I and Autocomplete Does Not Function
The title basically says it all - in Vim, my tab's show up as ^I, and I'm wondering if anybody knows why this might be. This is especially annoying when using :o to open a file, as the autocomplete ...
1
vote
1answer
47 views
zsh completion: getting file names from a specific directory
OK, a little background: I use a Mac, and I do as much as possible in the CLI.
In particular, I frequently pop in a USB stick, cp or mv a file over, and then immediately wish to eject (unmount and ...
1
vote
1answer
46 views
How to make ZSH tab completion work with two tabs
I saw a question like this on here, but the answer didn't work for me. I'm trying to set up tab completion and I want it that if I have two files fileA and fileB and I type fil<tab> it first ...
1
vote
1answer
132 views
bash autocomplete not working, does not 'complete'
I my bashrc. I have a bash completion for the command scp implemented as follows
function _scp_complete
{
COMPREPLY=""
COMPREPLY+=( $(cat ~/.ssh_complete ) )
COMPREPLY+=( $( find . ! -name . ...
3
votes
1answer
108 views
Restore default completion
I use compgen when $COMP_WORD equals 1, now I want to restore default completion when otherwise,
Right now I have,
_rr()
{
case $COMP_CWORD in
1)
COMPREPLY=($(compgen -W "A ...
1
vote
1answer
44 views
zsh autocompletion for symlinks
Say I have a folder parent with a subfolder, subfolder and a symbolic link symbolic_link.
I noticed that if my current working directory subfolder and I try to do cd ../sym[TAB], it will not ...
10
votes
1answer
152 views
Bash tab completion expands “~” into “/home/___” when it didn't before
Previously, if I typed ~/biTab, before, it would turn into ~/bin. However, today it started turning ~/biTab into /home/username/bin.
I would rather have it the former, but I'm not sure what happened ...
4
votes
3answers
109 views
Can any shell do argument-level interactive search?
Sometimes I need to reuse certain long arguments like paths.
If I use history search (CTRL+R), I may find some command that contains the path, but I still need to delete anything else in the old ...
2
votes
1answer
112 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 ...
0
votes
1answer
127 views
bash autocompletion not working for filenames (Debian wheezy 64bit)
Bash auto completion seems to work normally except on files.
ie, if I am in / and there is some directory structure
/
folder1/
folder2/
fileName
nameOfFile
other2/
otherfolder/
I can ...
3
votes
4answers
372 views
List all files / binaries in current PATH
Is there an "easy" way of running an "ls -la" style command for listing all files / executable binaries in the current PATH?
(I intend to pipe the output into grep, for looking for commands with ...
3
votes
1answer
70 views
zsh refusing to accept new autocomplete script
I have a software project that I'm attempting to write zsh completions for. After installing a package that provided a number of pre-made completions, I found they were put here:
...
2
votes
2answers
62 views
Expand less-than sign when using multios and brace expand
With zsh multios set (setopt multios) it's possible to do things like:
< in1 < in2 > out
and:
< in > out1 > out2
which is very convenient.
I want to combine this feature with ...
1
vote
1answer
83 views
How can one provide colour to tab completion in tcsh?
(Crossposted from StackOverflow.com)
This question and the answer teach us how to introduce colour into tcsh prompts.
This webpage explains nicely how to get colour into any output of the echo ...
2
votes
1answer
553 views
Weird autocomplete behaviour in ZSH / oh-my-zsh for directories that don't exist
UPDATE 3 I've worked out that these annoying autocomplete options are actually usernames. I.e. they exist in /etc/passwd I have users such as _kadmin_admin and _kadmin_changepw and many others ...
1
vote
3answers
110 views
VIM only files, cd only directories
When using Tab for completion on the Bash shell prompt, is there any way to configure it to complete only files for the command vim and only directories for the command cd? In large directories with ...
4
votes
0answers
23 views
Forward Autocorrect to a script [duplicate]
Possible Duplicate:
How do I get bash completion for command aliases?
I wrote a series of scripts to make package management a little more intuitive for me. However, I can no longer tab ...
7
votes
2answers
250 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?
5
votes
2answers
411 views
Create bash completion script to autocomplete paths after is-equal sign?
I want to create a bash completion script which recognises arguments of the form --arg and --some-arg=file.
After reading this tutorial and some examples in /usr/share/bash_completion/completions/, ...
5
votes
2answers
214 views
Bash autocomplete: first list files then cycle through them
Is it possible to configure bash in such a way that on the first tab autocomplete it lists all possible files and on subsequent ones cycles through the choices?
Both options are easy to do ...
1
vote
2answers
209 views
vi <TAB> completes only directories in bash
In a directory I type vi and then tab (twice), this gives me
user$ vi
CMakeFiles/ global/ libs/
whereas ls followed by 2 tabs gives me
user$ ls
! core.log CMakeFiles/ global/ libs/ ...
1
vote
1answer
86 views
refresh bash tab completion
I have a script for auto-completing my ssh-hosts. If I change my ~/.ssh/config the auto-completion is not updated automatically, though. This does not surprise me. In a new shell, the new entry is ...
5
votes
1answer
142 views
Custom bash autocomplete for git breaks other git autocomplete features
I am trying to add autocompletion to git commit upon hitting TabTab.
The autocomplete feature I am working on is based on a branch-naming convention. The convention is to append the PivotalTracker ...
1
vote
2answers
507 views
How to fix Linux filename tab autocomplete that is appending a space instead of trailing slash on directories?
For some strange reason my filename autocomplete is behaving differently than normal. Given the following file structure ./foobar/file.txt, if I want to delete file.txt, I type rm ...
1
vote
3answers
196 views
How to append / extend zshell completions?
I am using zsh with oh-my-zsh. Unfortunately, oh-my-zsh does not use file ~/.ssh/config for hostname auto-completion (see Issue #1009, for instance).
This could easily archived by the following code:
...
4
votes
1answer
152 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 ...
2
votes
3answers
916 views
Bash Auto-Completion feature for SSHing into Different Hosts
I have big list of servers which I normally ssh to all the time. Is there any way using bash or zsh so that I can keep the list of hostname and bash auto-completion goes through the file and gives me ...
2
votes
1answer
119 views
Stop tab completion suggesting 'messagebus'
I've got a directory called build, which I cd into quite a bit.
If there isn't any directory bu* in the current directory, zsh tab completion: cd buTAB suggests messagebus/, which isn't in .. If I ...
1
vote
2answers
83 views
bash autocompletion resets on every window
My terminal autocompletion does not work properly when I use root.
source /etc/bash_completion works if I invoke that manually.
I need to write above code in every new root terminal to be able to ...
4
votes
2answers
165 views
Inhibit Variable Expansion in Paths
How do I prevent Zshell (and Bash I assume) from expanding environment variables in paths be completed as shown in the following example:
$PREFIX/alt/li
should expand to
$PREFIX/alt/lib
and not ...
2
votes
1answer
107 views
Change completion behaviour with brace expansion in zsh
I have got used to using tab-autocompleting inside braces without expanding in zsh. This was possible, while I used zsh with a basic grml-config. Since I migrated to oh-my-zsh, I can't reproduce this ...
1
vote
1answer
65 views
Tab completion when `patch` asks for filename
When the patch command doesn't find the file to patch, it asks for a filename.
Is there any way to get this to use tab complete?

