All Questions
19 questions
-1
votes
1
answer
190
views
zsh: tab rotates between directories, what key to select and enter one?
I am trying to complete path within a directory tree. When I press tab at any directory level, completion rotates among all possible directory completions. Is there a way to bind a key to "select&...
1
vote
1
answer
299
views
How does Bash/Zsh identify the relevant command during completion?
When I start typing something into an interactive login shell (zsh or bash) and click tab, the shell offers me autocomplete suggestions.
I broadly understand how completion specs are defined. For ...
9
votes
1
answer
7k
views
bash like autocompletion for ssh command in zsh shell with /etc/hosts file?
zsh is great so far.
I am using zsh-completions but still I am unable to get autocompletion for ssh commands like in bash as shown in below screenshot:
How to get hostnames from /etc/hosts for ssh | ...
7
votes
1
answer
6k
views
alternative to bash complete in zsh?
I shifted to zsh from bash recently.
When I run complete -f _ssh sshrc it's showing
zsh: command not found: complete
What is the alternative to bash complete in zsh?
How to add an alias command ...
1
vote
1
answer
157
views
Stop completion on certain characters
With the grep command, I tend to use various combinations of -irln and restrict it to include one or more of the same file types py, js, html, css.
E.g.
grep -ril --include=*{html,css}
I'm defining ...
1
vote
0
answers
463
views
bash/zsh: Is it possible to prevent auto-inclusion of a slash when using tabs to autocomplete a path?
When I use tab to autocomplete a path, a trailing slash is automatically added.
I checked both bash and ZSH and I get the same behavior. Is it possible to prevent this?
I check unsetopt and I have "...
1
vote
1
answer
862
views
Make auto completion options remain on screen in zsh, like bash
As Apple rolled out the first developer previews of macOS Catalina, it seems like they have made the default shell into zsh, instead of the good old bash. I've kept myself at Mojave, but nonetheless I'...
5
votes
1
answer
575
views
Don't suggest current directory in autocomplete
I am a long time user of ZSH. It seems to me that I used to have this functionality a long time ago but then I rewrote my .zshrc (a long time ago) and now I miss this functionality every now and then. ...
6
votes
1
answer
3k
views
Automatically generate ZSH/Bash completion files
Does a tool exist that will automatically generate completion files for both bash and zsh?
I'd like to be able to specify one source of truth for my completions instead of maintaining a separate ...
1
vote
1
answer
338
views
Shell autocompletion very slow after partial disk formatting
I upgraded to Fedora 26 the day of the official public release earlier this week and, long story short, ended up screwing up my installation, so I did a partial reformatting . My disk layout is the ...
9
votes
2
answers
2k
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
1
answer
637
views
Shell that tab-completes prefix?
I would like tab completion to behave differently
when the cursor is at the beginning of a word
than when the cursor is at the end of a word.
I've only ever seen shells that tab-complete the suffix, ...
1
vote
0
answers
123
views
How to have full completion in a run application dialog?
I've configured XFCE to execute gmrun as run dialog (Alt-F2). It works great with completion on commands but does not propose completion on arguments.
How to set up a run dialog with full bash/zsh ...
10
votes
2
answers
2k
views
Bash/zsh tab autocomplete: Given initial command, ignore certain files in directory with autocomplete
What I'm asking is a little bit specific, and might be a different than other autocomplete questions on Unix Stackexchange.
Suppose I have a directory that looks like this
-rw-r--r-- 1 hlin117 staff ...
12
votes
3
answers
2k
views
Completion of words on the screen as in VIM (Bash or Tmux)
How can I configure Bash, Zsh or Tmux to complete the last matching identifier on the screen? Consider this common scenario:
$ git fetch
remote: Counting objects: 16, done.
remote: Compressing ...