Questions tagged [autocomplete]

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.

Filter by
Sorted by
Tagged with
1
vote
1answer
47 views

What is the function of @ at the command line after a file name

I noticed that when I tab complete after cat /home/@ I got some servers I have. Seems it's stuff I put in /etc/hosts. But what is the function of @ in this case. Am I missing some handy pipe ...
1
vote
2answers
1k views

Very slow auto-completion in Linux for Windows

For some reason auto-completion is very slow for me in WSL, it always takes several seconds display the result of, for example ll ~/Te<tab> (which would, after 2-3 seconds, print ll ~/Temp). I'...
1
vote
1answer
383 views

How to configure case insensitive completion of branch names for git in bash?

I use Debian Stretch for web development. Its default shell is bash. I use git for source versioning. I would like to have git branch names with case insensitive completion. At the moment, completion ...
2
votes
1answer
220 views

Tab completion on mosh (ssh) alias?

I've just started using mosh and I'm left thinking to myself "why didn't I start using this like two years ago?" I'm even more impressed by the fact that it reads my ~/.ssh/config and respects the ...
8
votes
2answers
1k views

Fish-like argument completion search in ZSH

I was messing around with fish and noticed this handy behavior If I typed wget -<tab><tab><tab>, I was put into an interactive menu. However, when I typed, I searched the ...
4
votes
1answer
257 views

How to deal with filenames containing a single quote inside a zsh completion function?

I'm using the zsh shell and have the following code inside my .zshrc: fpath=(~/.zsh/completion $fpath) autoload -Uz _vc autoload -Uz compinit compinit The first line add the path ~/.zsh/completion ...
9
votes
1answer
685 views

zsh apt list options completion

I'm used to using tab completion in bash to get apt list --upgradable by typing apt ltab--utab, but I can't do the same thing with zsh: --u doesn't expand to --upgradable when I press tab. I googled ...
2
votes
1answer
552 views

ksh tab completion not working if I've typed exactly 4 chars before pressing tab

If I have the folder ~/1234567 and I type one of the following: ls ~/123 cd ~/12 then press tab, everything's groovy. But if, on either of those commands, I type 1234 before hitting tab, the 4th ...
2
votes
1answer
101 views

What is the command line equivalent of kupfer/quicksilver/synapse quick starter?

I want a way to quickly launch programs while I'm in an SSH terminal. But I don't want to have to remember the exact command. For example, if I type "fox" into kupfer/synapse/quicksilver or unity ...
0
votes
0answers
253 views

Does zsh support cycling through completion alternatives?

Is it possible for zsh to cycle through bash-completion alternatives, as described in this question - Is it possible for bash completion to cycle through the alternatives? The option I am describing ...
1
vote
0answers
53 views

Automatically appearing completion menu on type

If I'm typing command in the shell it's required to press [tab] to call completion menu. Is it possible to configure zsh to call this menu on each typed symbol but without any modification of my ...
1
vote
1answer
103 views

scp aware of target machine path?

I recently switched from OSX to Linux for my personal use. I have a home media server running headless Ubuntu, and now a laptop running Mint. My habit is to move things to the server with scp. In the ...
1
vote
1answer
163 views

Define paths zsh autocomplete uses

Zsh, even with an empty zshrc file, appears to provide autocomplete options for every executable in my path. For example, typing ch<tab> gives me about 30 options, far too many to make ...
2
votes
1answer
112 views

Autocomplete in shell using last N bytes of stdout

I would find it very convenient if it would be possible to auto-complete using words from what I just seen on screen in terminal with TAB. Preferably in zsh. Is there any way to manage it? e.g. $ ...
1
vote
0answers
253 views

bash: source (“.”) completion

I have my own scripts folder somewhere in home. It's in PATH. In bash, when I start writing and hit TAB, the scripts get completed nicely. But when I start with . (source), completion with TAB doesn'...
2
votes
1answer
223 views

zsh: remove predicted text

I use following settings at zsh: zstyle ':completion:*' menu select autoload predict-on predict-on When I'm typing some command like ln and I'm not going to use anything what is predicted (-al for ...
0
votes
0answers
23 views

Directory name autocompletion with wildcards doesn't work in bash [duplicate]

If there are only 2 folders abc and def in the current directory, executing the command: $ ls a* and pressing TAB would autocomplete the name of the folder abc but executing $ cd a* and pressing ...
3
votes
1answer
1k views

How to diagnose slow tab completion? [duplicate]

There is a certain user who when they press tab key to complete a file path, it takes several seconds for the machine to make the completion. They are using the bash shell. How can I diagnose what ...
1
vote
1answer
79 views

Can I suppress autocomplete of a certain category in zsh?

When I attempt to autocomplete ssh in zsh, I am presented with two types of lists. $ ssh a<TAB> -- remote host name -- aur -- login name -- avahi However, the latter is not useful to me. Is ...
1
vote
1answer
142 views

File listing on tab completion

I experienced a strange behavior of bash shell tab completion while trying to run a python code. When I use more than one character followed by - prefixed argument, I am able to select the a file ...
0
votes
0answers
27 views

How can autocompletion for PON (PPTP VPN) command be enabled?

This is my PPTP peers config: $ sudo ls -la /etc/ppp/peers/ total 24 drwxr-s--- 2 root dip 4096 Oct 14 00:20 . drwxr-xr-x 7 root dip 4096 Oct 14 00:18 .. -rw-r--r-- 1 root dip 172 Oct 14 00:20 ...
1
vote
0answers
47 views

opensuse sudo bash completion gives full path names

There is this weird behavior with my openSUSE system whenever I try to run a program with sudo: What I type: sudo shutd<TAB> Expected it to return: sudo shutdown But what I got is this: ...
3
votes
1answer
64 views

Faster auto-completion for kanjis files/folders, without having to switch IME

I have a project with many Japanese kanji/kana folder and file names, like this: 提案書/ フォルダ/ 工数.sh 設計書.sh It takes so much time to change directories or open a file: Type the first part of the ...
3
votes
1answer
315 views

bash tab completion not working in >& redirection

When I use tab completion on an argument after ls command it works, but when I use it after some script argument (see second example below) it does not work. I have checked that tab completion is ...
1
vote
2answers
614 views

ctrl+x in vim text editor doesn't work as expected [closed]

I have Debian Jessie and vim terminal text editor. I try to autocomplete a file path in insert mode. When I type ctrl and x simultaneously no path completing is done but two chars are displayed: ^X ...
2
votes
0answers
127 views

bash custom tab completion with wildcards

I have a script (let's call it myscript) and I want to enable autocomplete arguments for files with a specific extension (e.g. .txt). I can do this simply with: complete -f -X '!*.txt' myscript Then,...
3
votes
2answers
390 views

Zsh git filename completion with “--git-dir=… --work-tree=…”: not a git repository

I track my dotfiles using this method: A bare repository resides in $HOME/repos/dotfiles. All my dotfiles reside in their normal location, e.g. $HOME/.vim/vimrc, not $HOME/repos/dotfiles/vimrc. I run ...
1
vote
2answers
673 views

vi tab completion not working

I'm trying to view the contents of files in /var/lib/php5/sessions, directory in which I have no permissions to do ls, so I have to use sudo ls to see all those files with long names, I would like to ...
1
vote
0answers
84 views

Bash extending completion on filepath

I use Zsh predominantly, one of the features I really enjoy is path/filename completion. The specific behavior I'm most interested in: Completing a full filepath from partial matches, e.g. ~/w/m/...
6
votes
4answers
2k views

Why bash disables autocompletion for some commands and how can I enable it?

It often happens to me that bash disables auto completion for certain commands. This forces me to add random symbol to name of command, use autocompletion, and than fix the command name. This is ...
2
votes
1answer
663 views

Auto complete not working on Fedora

I am using Fedora 25. Seem the autocomplete on terminal using tab key is not working.. For example, I got this message when I want autocomplete my command: sudo systemctl start httpd.serUnit ...
3
votes
1answer
668 views

Disable completion of substrings in zsh

I to disable the following behaviour: cd deo<Tab> --> cd Videos I'm using zsh 5.3.1 on macOS, with oh-my-zsh.
0
votes
0answers
290 views

How to implement autocomplete function for SVN repository?

I generally use the SVN command line client to access my SVN repositories; however, I find it tedious to have to memorize the exact repository structure or iteratively use svn ls to find what I am ...
0
votes
1answer
81 views

Enable command line completion of *.md files for firefox in konsole

When opening files in Firefox from konsole, the autocomplete function only works for certain file extensions like html, htm and the like. For other extensions, I have to type out the full name instead....
0
votes
2answers
67 views

Key I can hold down to only tab complete a folder

Say I have a directory like so: foo/ bar.js bar/ if I cd into foo and then type "ba" and then hit tab, I won't get completion because a file name overlaps with a folder. Is there a key I can ...
4
votes
1answer
592 views

Make Bash Tab Autocomplete match like “Contains” in all possible files instead of “Starting With”

I want to make the bash autocomplete on TAB behave a little like oh-my-zsh. I already added ignore case and cycle through all possibilities on each tab. Now currently if I have a folder in directory ...
5
votes
2answers
190 views

How to prevent bash to autocomplete the trailing dot?

Let's say I have a filename and different extensions to it: test.tex test.pdf It is easier to type just the filename without extension, then the whole filename. This is possible, because ...
3
votes
0answers
237 views

ZSH custom completion from command output

I am creating a custom completion for my command ipadd which will automatically complete all the network devices for OS X. It has a parameter --device which allows you to specify the network devices ...
0
votes
2answers
441 views

How can I skip --MORE— option when I tab in cd?

I wrote in terminal: cd /some_path/ then I pressed tab and if there are a lot of directories in some_path I saw a terminal with a lot of lines and at the end there is "--MORE--" option. I should ...
2
votes
2answers
7k views

zsh: command not found: {compinstall,compinit,compdef}

The zshcompsys man-page says: INITIALIZATION If the system was installed completely, it should be enough to call the shell function compinit from your initialization file; see the next ...
2
votes
0answers
258 views

how to scroll multiple lines in zsh screen completion

Thanks to this question, I was able to configure zsh to properly scroll one line up or down when hitting "pgup/pgdwn" in a autocompletion menu: bindkey "${terminfo[kpp]}" up-line-or-history bindkey "$...
0
votes
1answer
234 views

Making bash autocompletion work

I have a newly-reimaged VPS server. Bash tab completion and history (via the arrow keys) works as expected on the root account but is totally absent on my lower-privileged account. I also can't ...
2
votes
2answers
226 views

force loading completion function for zsh (without forcing its execution by hitting tab)

I want to replace an existing zsh completion function and keep a reference to the original (from here). E.g. to make tab completion always suggest nice as first word in a command line: eval "$(...
3
votes
2answers
2k views

Using zsh autocompletion for alias

I have created a few aliases for git in zsh, for example gch = git checkout, grb = git rebase --committer-date-is-author-date and some more complex useful zsh functions for git commands. But how can I ...
1
vote
2answers
145 views

Get zsh not to complete users

I have a directory with a single subdirectory named src. I'd expect when typing in cd s and hitting TAB for the directory to be completed. Instead, zsh tries to complete all users on the system ...
2
votes
0answers
202 views

Autocomplete flags after a subcommand

There is a program I have called luarocks that features a list of subcommands like build, install, and make, with flags after them. At the end, a command would like like the following: # luarocks ...
0
votes
1answer
831 views

zsh path/file name completion on -file= arguments

Can I enable zsh to complete path/filenames in a shell argument such as command -file=/ I do get path/filename completion when I do file=/<TAB> without a dash This is possible at least on ...
4
votes
0answers
138 views

How do I wrap the zsh completion list with a fixed line of text before and after?

Specifically, I'd like to arrange for all completion lists (under the :completion:* context) to be preceded and followed by a fixed string (say "ABC" for the moment) on its own line. I have tried a ...
17
votes
1answer
981 views

Zsh tab completions not working as desired for partial paths

I want case-insensitive fuzzy completion for files and directories in zsh. After reading the manual for a few hours, this is what I came up with: zstyle ':completion:*:*:*:*:globbed-files' matcher 'r:...
2
votes
0answers
95 views

Printing autocomplete info on current option in fish shell

When writing a command with a - option and pressing tab, a list of possible completions with short explanations of what the options do is displayed. Is there a way to make this list also contain the ...