Simplify _screen_sessions(), use compgen -W, fixes partial completion.
This commit is contained in:
parent
d68b471905
commit
b7937bf2f0
@ -3,16 +3,9 @@
|
|||||||
have screen &&
|
have screen &&
|
||||||
_screen_sessions()
|
_screen_sessions()
|
||||||
{
|
{
|
||||||
local pattern
|
COMPREPLY=( $( compgen -W "$( command screen -ls | sed -ne \
|
||||||
|
's|^\t\{1,\}\([0-9]\{1,\}\.[^\t]\{1,\}\).*'"$1"'.*$|\1|p' )" \
|
||||||
if [ -n "$1" ]; then
|
-- "$cur" ) )
|
||||||
pattern=".*$1.*"
|
|
||||||
else
|
|
||||||
pattern=".*"
|
|
||||||
fi
|
|
||||||
|
|
||||||
COMPREPLY=( $( command screen -ls | sed -ne \
|
|
||||||
's|^['$'\t'']\{1,\}\('"$cur"'[0-9]\{1,\}\.[^'$'\t'']\{1,\}\)'"$pattern"'$|\1|p' ) )
|
|
||||||
} &&
|
} &&
|
||||||
_screen()
|
_screen()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user