You are not logged in.
Dear community,
I am having an auto-completion issue when trying to make the 'screen -r' + tab show me all my sessions that can be attached.
Under bash the autocompletion for screen -r works fine, but under zsh it does not and instead it offers me out of context options
such as in the example below.
➜ ~ screen -S hello
[detached from 2525.hello]
➜ ~ screen -ls
There is a screen on:
2525.hello (Detached)
1 Socket in /run/screens/S-xxx.
➜ ~ screen -r (pressing tab)
bin@ dev/ home/ lib64@ mnt/ proc/ run/ srv/ tmp/ var/
boot/ etc/ lib@ lost+found/ opt/ root/ sbin@ sys/ usr/As a comparison, bash offers me the correct auto-completion
[xxx@carbon ~]$ screen -ls
There are screens on:
2657.bye (Detached)
2621.hello2 (Detached)
2525.hello (Detached)
3 Sockets in /run/screens/S-xxx.
[xxx@carbon ~]$ screen -r (pressing tab)
bye hello hello2 Any idea how to make zsh auto-complete correctly? I am using the default oh-my-zsh configuration.
EDIT:
using the default zsh (no oh-my-zsh) also reproduces the problem, but showing my home folders
There are screens on:
2657.bye (Detached)
2621.hello2 (Detached)
2525.hello (Detached)
3 Sockets in /run/screens/S-xxx.
carbon% screen -r
amaroseba/ Documents/ lin_xeon64.txt Pictures/ test/
DELAUNAY/ Downloads/ Music/ Folders.conf.example* testio/
Desktop/ Dropbox/ octave-workspace Public/ Videos/
dnn-acustica/ generator/ Online-Judge-Solutions/ Templates/ Last edited by labotsirc (2017-03-22 14:02:27)
Offline
I am using the default oh-my-zsh configuration.
And does it work without using OMZ?
Offline
labotsirc wrote:I am using the default oh-my-zsh configuration.
And does it work without using OMZ?
just tried now. Does not work. Post updated.
Offline
run "strace zsh 2>&1 | grep _screen | grep open" and see which completion script is ultimately used when attempting to complete screen, check whether it's provided by zsh ("pacman -Qo /path/to/_screen") and whether it's sane ("pacman -Qkk zsh")
Offline
run "strace zsh 2>&1 | grep _screen | grep open" and see which completion script is ultimately used when attempting to complete screen, check whether it's provided by zsh ("pacman -Qo /path/to/_screen") and whether it's sane ("pacman -Qkk zsh")
Hi seth,
here is the output, i am not sure if I did it correctly (Opened a straced zsh session as you indicated and reproduced the act of tabbing the "screen -r" command, then exited and got that message).
➜ ~ strace zsh 2>&1 | grep _screen | grep open
➜ ~ screen -r
➜ ~ exit
open("/usr/share/zsh/site-functions/_screen", O_RDONLY|O_NOCTTY) = 3then,
➜ ~ sudo pacman -Qo /usr/share/zsh/site-functions/_screen
[sudo] password for cristobal:
/usr/share/zsh/site-functions/_screen is owned by screen 4.5.1-2then
➜ ~ sudo pacman -Qkk zsh
zsh: 1077 total files, 0 altered filesI also noticed this file
sudo pacman -Qo /usr/share/zsh/functions/Completion/Unix/_screen
/usr/share/zsh/functions/Completion/Unix/_screen is owned by zsh 5.3.1-2What is not clear for me, if another person installs zsh and tries to tab-complete the screen -r command, does it work properly?
Last edited by labotsirc (2017-03-22 13:38:26)
Offline
/usr/share/zsh/site-functions/_screen will not do what you want (it's an autogenerated basic thing), /usr/share/zsh/functions/Completion/Unix/_screen should.
Try to move the former aside, start a new zsh, see what happens.
You could file against the screen package (arch bugtracker, not gnu) to skip the completion file provided by screen because the one provided by zsh is much more sophisticated.
Offline
/usr/share/zsh/site-functions/_screen will not do what you want (it's an autogenerated basic thing), /usr/share/zsh/functions/Completion/Unix/_screen should.
Try to move the former aside, start a new zsh, see what happens.
You could file against the screen package (arch bugtracker, not gnu) to skip the completion file provided by screen because the one provided by zsh is much more sophisticated.
Just tried, it works!.
Moved /usr/share/zsh/site-functions/_screen to /usr/share/zsh/site-functions/backup-_screen and the problem was fixed. Marking as solved and many thanks for the help
. Ill see how to file against the screen package too.
Last edited by labotsirc (2017-03-22 14:03:13)
Offline
In case someone is interested
task submitted to the bugtracker.
https://bugs.archlinux.org/task/53417
Last edited by labotsirc (2017-03-22 18:02:28)
Offline