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
199
questions
0
votes
0
answers
42
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 ...
3
votes
1
answer
126
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-...
0
votes
1
answer
28
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 ...
-1
votes
1
answer
1k
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 ...
1
vote
0
answers
124
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 ...
4
votes
1
answer
276
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 ...
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: [: -...
3
votes
1
answer
2k
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 ...
0
votes
1
answer
548
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 ...
0
votes
1
answer
219
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 ...
7
votes
3
answers
2k
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 ...
3
votes
6
answers
9k
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 ...
0
votes
0
answers
402
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 ...
-4
votes
1
answer
76
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&...
1
vote
0
answers
462
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 ...
1
vote
1
answer
453
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 ...
0
votes
1
answer
127
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 ...
2
votes
0
answers
89
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 ...
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 ...
6
votes
3
answers
14k
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 ...
2
votes
0
answers
417
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 ...
2
votes
0
answers
48
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 ...
1
vote
0
answers
98
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=()
...
0
votes
0
answers
72
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 '$' ...
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 ...
1
vote
1
answer
339
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 ...
3
votes
0
answers
193
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 ...
4
votes
3
answers
8k
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 ...
1
vote
0
answers
247
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 ...
1
vote
1
answer
936
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 ...
0
votes
1
answer
513
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 ...
2
votes
1
answer
387
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 foo.bar@gmail.com.
So far I read these links:
...
8
votes
3
answers
3k
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 ...
2
votes
1
answer
921
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 ...
0
votes
2
answers
280
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 ...
2
votes
0
answers
785
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 ...
10
votes
2
answers
13k
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 ...
6
votes
2
answers
2k
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 ...
2
votes
1
answer
437
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 ...
4
votes
1
answer
3k
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 ...
2
votes
0
answers
320
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 ...
1
vote
0
answers
160
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 ...
1
vote
0
answers
612
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 ...
1
vote
0
answers
320
views
bash filename autocomplete - does it have to use so much screen space?
I have a vague memory of this working in the past, but can't find any info now.
Using TAB in bash to show available filename completions lists them on the line(s) below the command and then reprints ...
1
vote
1
answer
965
views
How does ubuntu terminals autocomplete work?
How does it know what arguments a command expects and whether it is expecting file as input?
How does it know what commands are available?
1
vote
0
answers
1k
views
apt install - can't autocomplete package names (Docker)
It's the same error as in several other posts, but none of the solutions work for me.
I'm typing
apt-get install ar<TAB><TAB>
and there's not auto-completion. I'm using an Ubuntu-...
2
votes
1
answer
670
views
Autocomplete dotfiles without typing the leading dot
I've been getting close to bash on finding the really nice features of Bash-it.
I want to be able (or so I think) to key ls file, and on pressing Tab ↹, i get a list of dotfiles, or the single one ...
1
vote
1
answer
476
views
Is it possible to achieve autocomplete to predifined text in gnome-terminal?
I have started learning Ubuntu since 1 year..
During this 1 year period I typed a lot of these below texts in gnome-terminal
sudo -H nautilus /foo1/foo2/foo3/foo4/
sudo -H gedit /foo1/foo2/foo3/foo4/
...
4
votes
3
answers
2k
views
Word Prediction like Android "keyboard"
Is there a way to get word prediction like on android?
Like on this screenshot:
This would improve the speed of typing on Ubuntu a lot.
I need it here:
thunderbird
Browser textarea
gedit
Required ...
1
vote
0
answers
153
views
How do I get prompt colours and auto-complete on 18.04 for a new user created with useradd?
I use Tilix, which is imo one of the best VTE based terminal emulators for Linux. If I create an Ubuntu 16.04 image on DigitalOcean, connect to it via SSH and then configure a new user (as below), ...