Most shells provide tab completion where a user can type part of a command or file name, and then press tab to make the shell complete the command. This saves greatly on the number of key presses needed when working on the command line.
Questions tagged [tab-completion]
359 questions
0
votes
1 answer
Prevent Sublime Text 3 from tab completing 'sup' to '' in a non-HTML file
When I type sup then TAB in Sublime Text 3, I get . That isn't what I want; I only want tab completions based on what is in my current file.
How can I limit tag style tag-completions to just HTML files?
I was hoping to find a setting called…

David J.
- 31,569
- 22
- 122
- 174
0
votes
1 answer
bash script, prompt user to select ID or name completion
I am working on a script that reads the directories in a path and prompts the user for witch directory to choose. The script so far looks like this:
select choises in ${list_files[@]}; do
if CONTAINS_ELEMENT $choises "${list_files[@]}"; then
…

Dan-Simon Myrland
- 327
- 1
- 5
- 10
0
votes
1 answer
Python Tab Completion Pager
I've tried searching for this answer, and either don't have the right word combination, or simply can't find, but I apologize if it's a repeat:
When in a python interpreter (running python[3] from the command line, i.e. not IPython or anything), how…

dwanderson
- 2,775
- 2
- 25
- 40
0
votes
1 answer
Multiple completion styles in Python
I've been playing with Python's readline module. One of the things I noticed is the lack of support to directly bind a key to a Python function. In other words, there is no binding for readline's rl_bind_key().
My intention is to have different…

C2H5OH
- 5,452
- 2
- 27
- 39
0
votes
1 answer
Colorized output in the swipl-win (SWI-Prolog) window
What I'm Doing
I am currently working on creating a SWI-Prolog module that adds tab-completion capability to the swipl-win window. So far I've actually gotten it to where it reads a single character at a time without stopping/returning anything…

ksoo
- 434
- 1
- 3
- 15
0
votes
0 answers
Evil Mode in Emacs 24 tab completes case-sensitively using :ed command
I've been using EVIL with Emacs 24.3 for a few weeks now, and I wish I could get it to tab complete case-insensitively in the minibuffer when using the :ed command.
I looked into it, and :ed is mapped to 'evil-edit, a function that essentially…

Russ Phelan
- 1
- 2
0
votes
1 answer
Bash console tab-completion in Ubuntu
I used to develop in RedHat and never had the following problem until I switched to Ubuntu:
Whenever I use tab-completion (which is ALL the time) I noticed that depending on what command I am about to execute the behavior differs. For example:
vim…

NindzAI
- 570
- 5
- 19
0
votes
1 answer
How to do brace expansion tab-completion, for filenames in vim?
In vim (and bash), you can specify alternatives in filenames, eg:
:arga project/html/{index,sitemap}.html
This expands to "project/html/index.html" and "project/html/sitemap.html" (the :arga appends them both to the argument list; you can get to…

13ren
- 11,887
- 9
- 47
- 64
0
votes
1 answer
How do I use tab completion in Rstudio
I've been using Rstudio for a few weeks now, and the tab completion has worked inconsistently for me. For example:
my_variable = 10
my_va
Those are the only two lines in my R-script. When I press tab to use completion, a small message appears next…

davidhwang
- 1,343
- 1
- 12
- 19
0
votes
3 answers
Using append() and readline for completion in python
Specifically can I provide append() a Null/None value in Python?
I am trying to add auto complete functionality to a command line application, so am using readline to obtain anything the user may have typed at the raw_input prompt.
I'm getting an…

zeb
- 29
- 3
-1
votes
1 answer
How to find the right ZSH $fpath at CMake time (Linux distro differences)?
Situation
Software author wants to add zsh completion to his project. Has written completion script, works.
Needs to figure out where under $CMAKE_INSTALL_PREFIX to install so it gets found by default.
Problem
Testing Fedora 34 against Ubuntu 20.04,…

Marcus Müller
- 34,677
- 4
- 53
- 94
-1
votes
1 answer
How to get tab completion for $PATH as an argument in a bash script?
I have a very simple script that benchmark apps using the Vulkan API. it takes an argument from $1:
benchmark-app:
#!/usr/bin/env bash
VK_INSTANCE_LAYERS=VK_LAYER_MESA_overlay VK_LAYER_MESA_OVERLAY_CONFIG=position=top-right $1
To use it, I run…

Gareth Anthony Hulse
- 61
- 5
-2
votes
1 answer
Utilizing Bash Completion in a script
I have a script which takes a UUID as the argument. When I run it manually I can access it using custom tab completion I have written. Is there a way of accessing this completion in a shell script?
~/myscript stop 0011
It will complete…

Luke Exton
- 3,506
- 2
- 19
- 33
-3
votes
1 answer
I write a bash file using tab-completion by complete command, but in zsh it didn't work
source code:
#!/bin/bash
complete -W 'word1 word2 word3 aa bb' ./test.bash
echo "the param is: $1"
When I run ./test.bash , turns out the file list of current dir.
complete command doesn't work in zsh??

fujian26
- 70
- 7