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
3
votes
0answers
22 views
Custom autocomplete: deal with spaces in filenames
A bit of context, this question is a follow-up of this one: Bash remote autocompletion : change the 'starting' directory
Anyway, I'm writing my custom autocompletion bash script: I want the ...
2
votes
1answer
113 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 ...
7
votes
2answers
251 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?
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
262 views
How to enable tab completion of wildcards in bash?
How can I enable tab completion in bash for a statement such as vim db/migrate/*crea? Essentially I am looking for tab completion to match the regular expression and present the options.
How would ...
3
votes
2answers
63 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
42 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
46 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 ...
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
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 ...
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 ...
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 ...
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 ...
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 ...
10
votes
4answers
1k views
Command-line completion from command history
So, I've looked at history and at Ctrl+R, but they are not what I thought I knew.
Is there a way that I can type in the beginning of a command, and cycle through the matches in my history with some ...
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 ...
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 ...
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
68 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
1k views
Disable bash tab completion
Is it possible to disable bash's autocomplete on pressing tab?
The reason I want to do this is that I often paste code from an editor where I use the tab character instead of a number of spaces for ...
-1
votes
1answer
297 views
Phrase Express Equivalent for Linux?
Is there some sort of auto text-insertion program with macros, similar to PhraseExpress for Windows in Linux?
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 ...
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 ...
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 ...
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
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 . ...
6
votes
5answers
267 views
How to disable emacs here document completion
When editing a bash script file with emacs, and trying to enter <<<, at the second < emacs insert a template for a here document, like in the following example:
<<EOF
EOF
This is ...
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
3answers
916 views
How can I tell bash valid tab-completions for arguments to my Python script
Say I have a program hello.py and one possible valid argument to it is:
./hello.py autoawesomesauce
Is is possible to type in:
./hello.py auto[tab]
at which point the partially completed ...
4
votes
0answers
159 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 ...
11
votes
1answer
324 views
Dynamically update completion list in zsh
I find zsh's result lists for Tab completion quite useful, however I'd like to tweak their behaviour a bit:
They should appear when I Tab for the first time and afterwards dynamically update with ...
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 ...
2
votes
0answers
236 views
How to enable local ~ autocompletion for scp?
Whenever I want to copy a file from my home directory, I run into the same issue: scp (using openssh-client 1:5.9p1-5ubuntu1, GNU bash, version 4.2.24(1)-release (x86_64-pc-linux-gnu)) won't ...
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 ...
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
374 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:
...
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 ...
1
vote
3answers
197 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:
...
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 ...
2
votes
1answer
390 views
Avoid a trailing slash in bash when completing a directory name (like zsh)
I'm on a Mac and the cp and mv commands are killing me due to them copying the contents of a directory if a trailing slash is present. It has bitten me more than once when I use tab completion to ...
5
votes
4answers
2k views
Apt-get autocompletion
I am currently running 64-bit Debian Wheezy.
I am having some trouble with auto completion for apt-get. I have bash-completion installed.
If I am logged in as root in a shell, I can use auto ...
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 ...
3
votes
2answers
529 views
Tab autocompletion and history in tcsh
I use tcsh, and I'd like to set up the following behaviour, which I've seen on some systems in the past. If I type
!string TAB
then:
If the history contains a unique entry beginning with string, ...


