Questions tagged [auto-completion]

Anything related to automatic completion of path/file/folder names or commands such as the ones provided by bash-completion package

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

rsync remote paths with spaces and autocompletion is not working

Running Ubuntu 22.04 I have a remote server that I can connect to with ssh. ssh remote So I can copy a file with rsync: rsync remote:text.txt . rsync will autocomplete tex to test.txt when I press ...
Janghou's user avatar
  • 5,689
2 votes
1 answer
110 views

Auto-completion puts back-slash before $ mark, how can I disable it? (ubuntu 22.04)

To access files in a directory from another directory, I often set a variable for that directory. For example (so you can try it your self), export dir1=/usr/local/bin and then type ls $dir1/ ...
Chan Kim's user avatar
  • 1,959
1 vote
0 answers
70 views

Bash Completions "Mashed" Together

Recently, my Bash completions (assuming that's what you call the results after a tab, tab) have been messed up, returning all the commands, kind of mashed together. For example, typing docker then tab,...
stumpylog's user avatar
0 votes
0 answers
347 views

ls: cannot access X: No such file or directory

When I try to use the command "unzip " on any folder I immediately get the line unzip ls: cannot access 'tmp': No such file or directory ls: cannot access 'tmp': No such file or directory ^C ...
anon's user avatar
  • 1
0 votes
0 answers
95 views

Need to edit, improve the auto completion on sudo

How can we improve the auto completion on sudo, as it should complete second argument, i.e. the rooted executable's first argument, with items of the current working directory files instead of that of ...
itil nonok's user avatar
2 votes
1 answer
134 views

How to remove a particular bin from path/auto-complete?

I don't have sudo privileges on my work laptop and tmuxinator is installed, but I wish to use tmuxifier instead. I successfully installed the latter (without needing sudo by using git), but now, ...
stuball's user avatar
  • 31
0 votes
0 answers
157 views

Is there a way to make the bash auto-complete show a different completion list than what will be used to actually auto-complete?

first question here ^^ I have a an auto-completion script which contains this : COMPREPLY=() mapfile -t MAP< <(compgen -A directory -- "$cur") for entry in "${MAP[@]}&...
Bastougne's user avatar
1 vote
1 answer
177 views

Is there a way to configure bash or pass so that `pass otp pass-name` commands will tab complete like regular `pass pass-name` commands?

I can use the tab key to auto-complete a pass pass-name command, but no such auto-complete is happening when trying the same with a pass otp pass-name command. Is there some configuration that I need ...
Broadsworde's user avatar
  • 4,122
4 votes
1 answer
563 views

Bash completion not working in subshell

When I start a bash subshell (by calling bash from my command prompt), all tab completion stops working. The complete command becomes empty in the new shell: $ complete [...] complete -F _apport-...
PieterV's user avatar
  • 227
0 votes
1 answer
42 views

Can bash "complete" command change so far typed input?

I'd like to write a dynamic completion script that modifies the so far typed command. For example if I type: $ myapp give me a random command<tab><tab> completion function would call REST ...
Kragh's user avatar
  • 1
-1 votes
1 answer
2k views

Terminal auto-completion does not work

The auto-completion in the terminal doesn't work that means that nothing happens. Ubuntu version is 20.04 LTS a) echo $SHELL is /bin/bash b) I reinstalled the bash completion package with sudo apt-get ...
raul999's user avatar
1 vote
0 answers
173 views

Bash Autocomplete script that uses otherh auto completions

Hey guys I have been searching and reading about bash completions scripts and I cant seem to find exactly what I need. The autocomplete behaviour I am looking for is similar to the time command in ...
Brad's user avatar
  • 170
4 votes
1 answer
427 views

How do you add Bash autocompletion to a snap that doesn't have it (example: canonical-livepatch)

The canonical-livepatch snap does not feature autocompletion for its subcommands. As per the help page, the valid subcommands are: $ canonical-livepatch help ... COMMANDS: config - configure ...
Artur Meinild's user avatar
0 votes
0 answers
16 views

Git autocompletions raises the error "bash: [: -lt: unary operator expected" [duplicate]

In a Ubuntu 21.10 (new computer with setup) with git version 2.32.0 and bash version 5.1.8(1)-release (x86_64-pc-linux-gnu) I can't use alias for git checkout because it generates the error bash: [: -...
Albert Català's user avatar
6 votes
1 answer
4k views

ssh known_hosts file not using hostnames anymore

I'm running into this weird issue when I ssh into a new machine but my known_hosts file gets updated with a hash of sorts but not the hostname. This ends up with me not being able to autocomplete when ...
Koen van der Rijt's user avatar
0 votes
1 answer
1k views

Can I get better tab completion in terminal? [duplicate]

Say I have three files with filenames beginning with s in a folder. If I type s and hit Tab, I get the error ding sound and nothing completes in the terminal. I have to type out enough of the filename ...
gfries's user avatar
  • 63
1 vote
1 answer
392 views

Auto Correct software for Ubuntu 21.10

Windows 11 has been released with new features, one of which is a special kind of grammar checking software. How can I get a similar thing in Ubuntu 21.10? I want autocorrect to work in all ...
Error404's user avatar
  • 7,370
7 votes
3 answers
3k views

How to make alias to systemctl with autocomplete

I tried alias sct='systemctl' complete -F _systemctl sct But the function _systemctl is not found until I run the original command systemctl in the session. This function loads dynamically or somehow ...
tehkonst's user avatar
  • 343
5 votes
6 answers
18k views

Ubuntu command-line suggestion

I've been using Ubuntu 20.04 and trying to get used to it. but repeating same command in terminal is quit boring. i just want some suggestion to get rid of it and how can i get visible command-line ...
Mojaer Ahmed's user avatar
0 votes
0 answers
512 views

Bash Autocomplete Package with IDE-like Feature

Using Ubuntu 20.04. I was wondering is there an open source package or extension that will make the bash terminal feel like an IDE with dynamic autocomplete suggestions while typing (without pressing ...
Della's user avatar
  • 505
-4 votes
1 answer
83 views

Bash autocompletion [closed]

When I'm typing in the bash, something is trying to autocomplete my input in a rather weird way, see picture attached. I'm not pressing tab or something, just trying to type like "describe table&...
Laurel's user avatar
  • 7
1 vote
0 answers
570 views

Terminal autocomplete doesn't work after some updates

I have been using Ubuntu for quite some time now. At first everything worked good. After some update that was released lately (probably less than 2 months), terminal does not autocomplete commands any ...
Alduxo's user avatar
  • 11
1 vote
1 answer
795 views

bash tab auto-complete is too slow but it isn't with teraterm or putty

I'm using Ubuntu 18.04 and it got stuck in 1~2 seconds when I push the tab button for auto-completion. I've been trying to resolve this problem but I couldn't make it. I even changed my computer to ...
chae seongwoo's user avatar
0 votes
1 answer
211 views

History and autocompletion do not work in SSH PAM session (openssh-server, libpam-ldap and nscd)

I configured a Linux Ubuntu 20.04 LTS VM, to authenticate users in the LDAP base and it worked correctly, however, when trying to repeat commands already executed, as we normally do in Linux, pressing ...
Marcos Santos's user avatar
2 votes
0 answers
156 views

Tab completion for pdf files with spaces in path

I want to open the pdf file ~/dir1\ with\ spaces/dir2/file.pdf from the command line. I type evince ~/dir1\ with\ spaces/ and hit TAB twice for autocomplete. But I won't get offered dir2. After adding ...
azimut's user avatar
  • 979
0 votes
1 answer
34 views

auto suggested text intermittently changes what I have typed

This is difficult to describe because it is intermittent. But sometimes when I type in Firefox on Ubuntu, the suggested text in the drop-down box will overwrite what I have typed. This doesn't seem to ...
Hilton's user avatar
  • 61
9 votes
3 answers
23k views

What tool do I need to install to make my terminal show the autocompletion of the command that I'm writing?

I use Ubuntu on a daily basis, recently I've seen that the terminal on Kali Linux behaves differently from the terminal on Ubuntu... I can see the end of the command that I'm typing based on the ...
raylight's user avatar
  • 493
2 votes
0 answers
473 views

Ubuntu 18.04 Bash autocomplete slow/freezing

Bash autocomplete seems slow/freezes at times. The cursor stops blinking for 1-2 seconds and then the autocomplete prints. It happens for some directories. For eg I have a projects directory cd ~/proj ...
AAB's user avatar
  • 175
2 votes
0 answers
51 views

'$ git' autocomplete seems to print colour code

When typing $ git in my CLI and pressing tab stop for autocompletion, I get the following sugestions, which look like having extra colour highlighting for bash text. $ git ^[[01;31m^[[K ...
Nepumuk's user avatar
  • 121
1 vote
0 answers
113 views

bash autocomplete personal command : cannot autocomplete the argument after the option

I wrote the autocomplete function for my command, but it is not autocomplete the argument after the option flag function _qpdm_complete() { local cur prev options my_list COMPREPLY=() ...
Roman Kaganovich's user avatar
0 votes
0 answers
82 views

Why autocompletion in terminal converts $ENVAR to \$ENVAR? (Ubuntu 20.04)

I recently installed Ubuntu 20.04. When I pressed the tab key for auto-completion of an environment variable, let say ENVAR, which contains directory information, it suddenly converted the '$' to '$' ...
Geon-Hong Kim's user avatar
0 votes
0 answers
25 views

TAB does't work properly with `cp` command when using environment variables [duplicate]

Question When using cp command with environment variables, why pressing TAB for auto-complete doesn't work properly? Description I have a directory $HOME/Music; I want to copy a file from within this ...
Naghi's user avatar
  • 157
1 vote
1 answer
450 views

Make annoying executable invisible to bash tab completion (cd-it8 etc)

When using the command line, cd is one of the most frequently used shell commands. I've gotten used to the ability to type cd, pressing tab, and then pressing tab again to see what directories there ...
cheater's user avatar
  • 173
3 votes
0 answers
226 views

Gedit: how to disable auto-completion in search/replace window

I am using Gedit 3.28.1 on Ubuntu 18.04 64bit as my favourite script editor. Gedit not only stores some of my newest search/replace strings so that I can select them from the drop-down list in the ...
Shakesbeer's user avatar
4 votes
3 answers
9k views

Jupyter Notebook autocomplete not working

I am using Ubuntu 20.04 I installed Jupyter Notebook in a virtual environment I created in a folder. It's all working fine, but clicking on TAB after a dot isn't showing me the methods available. Is ...
Vamsi Mohan's user avatar
1 vote
0 answers
357 views

Autocompletion doesn't work without sudo

When I try to Tab the way like /etc/freeradius/3.0/sites-available Tab doesn't show me variants of files that are inside the directory and also doesn't allow me to autocomplete this way. How can I ...
Timofey Pasichnik's user avatar
1 vote
1 answer
1k views

Tab autocomplete in bash does not work for directories but does work for programs Ubuntu 16.04

I'm getting the same message each time I try and [TAB] to autocomplete into a directory: test being the directory within var/www/html # hitting [TAB] after typing 'test' $ ll test-bash: cannot create ...
kaplan's user avatar
  • 111
0 votes
1 answer
650 views

How can I use the output suggestion by apt and other terminals use?

Have you ever had to run a command which is not found on your system, but apt suggests you to install it running command? Do you know if it would be possible to autocomplete the terminal prompt with ...
Farte Razvan's user avatar
2 votes
1 answer
416 views

How to create Bash script to complete my email address?

I am trying to write a bash script to auto-complete my email address. So my goal is whenever I type foo in terminal and hit tab it completes it with [email protected]. So far I read these links: ...
Pouria Moosavi's user avatar
10 votes
3 answers
4k views

How do I enable zsh package suggestions as in Ubuntu bash?

I'm slowly transitioning to zsh from bash and am loving almost every part of it, but there are two things I'm really missing. One of them is snap completions, see here: Enable snap TAB-completion for ...
El Senor's user avatar
  • 342
3 votes
1 answer
2k views

bash-completion: how to select among different alternatives

In bash, how can I select an option from a list displayed by TAB? Ex. Suppose vim <TAB> shows different possibilities txt1 txt2 txt3. How can I select the first one (txt1)? EDIT: let me be ...
aretor's user avatar
  • 193
0 votes
2 answers
431 views

No history and path/bash completion on some systems

For some reason, I don't have a history of commands in the terminal and neither can I complete paths or commands. Pressing arrows also show symbols like ^[[D and ^[[C. The shell is bash and .bashrc ...
aardbol's user avatar
  • 111
2 votes
0 answers
905 views

Terminal Autocomplete and History does not work

I am a Mac user who has recently switched to Lubuntu on my personal laptop. The issue I'm facing is that my terminal does not do any sort of autocomplete or show history. Pressing Tab just adds a tab ...
Navaneeth Gopal's user avatar
10 votes
2 answers
17k views

Why doesn't auto complete work in my shell?

I am not so into Linux and I have the following doubts: a client provided me an Ubuntu 18.04.3 LTS virtual machine which I access via SSH. (I am using MobaxTerm as SSH client but it should not be the ...
AndreaNobili's user avatar
  • 4,499
6 votes
2 answers
3k views

How should I install my own bash completion script?

I've written some software that includes its own Bash completion script. This script works fine when I source it manually, but I'm trying to figure out how best to install on Ubuntu 18.04. There are ...
user161768's user avatar
2 votes
1 answer
534 views

Ubuntu 19.04 word prediction / suggestion / autocomplete

I have moved to Ubuntu 19.04 from Windows 10 and I noticed that Ubuntu predicts the words I am about to type, based on my previously typed words. I liked it at first, but now, a few months later, I ...
zerdox's user avatar
  • 143
4 votes
1 answer
5k views

How do I apply tab completion on a script from any directory?

I have a bash autocompletion function _customcomplete that I want to apply on a script called run.sh. If I call complete -F _customcomplete ./run.sh, then the autocompletion script works fine as long ...
nardavin's user avatar
2 votes
0 answers
351 views

How can I get usernames to tab complete again in 19.04 server when using su?

One of my servers was originally running Ubuntu Server 18.04 (Bionic) and a very common task would be to substitute user, eg. su like this: su someusername Usually I would use tab completion to ...
Kristopher Ives's user avatar
1 vote
0 answers
171 views

Bash Autocomplete for Non-Neighboring Directories

I recently wrote a program that can instantly switch to a directory if it has a unique name with respect to some given baseline. For example, if I have a directory: ~/Documents/foo and foo is a ...
gidgers's user avatar
  • 11
1 vote
0 answers
676 views

Enable snap TAB-completion for zsh

Does anybody have an idea how to get the TAB-completion for zsh working for the snap command? According to the answer in How can I enable auto-completion for the snap command? it should be working ...
InvisibleShadowGhost's user avatar

1
2 3 4 5