zsh completion doesn't work with sudo
- Dominant language
- Go
- Stars
- 83k
- Forks
- 2.9k
- Avg merge
- 17h 8m
- Merged PRs (30d)
- 10
Description
- [x] I have read through the manual page (`man fzf`). But that doesn't apply anyway...
- [x] I have the latest version of fzf
- [x] I have searched through the existing issues
## Info
- OS
- [x] GNU/Linux
- [ ] Mac OS X
- [ ] Windows
- [ ] Etc.
- Shell
- [ ] bash
- [x] zsh
- [ ] fish
## Problem / Steps to reproduce
Zsh completion for custom programs doesn't work when `sudo` is the first word on the command line. Usual completion with zsh does support that behaviour on the other hand, i.e. completion for some program name `foo` will work even though `sudo` is the first word on the command line.
However, this is not limited to custom definitions. The case of `kill` doesn't work. For instance, writing
```
$ kill **
```
works, but the following doesn't:
```
$ sudo kill **
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing completion for `kill **` and `sudo kill **` in zsh on GNU/Linux, then inspect the zsh completion integration for how the command position is detected. Done means custom program completions and the `kill` completion work when `sudo` is the first command-line word.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- zsh
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100