zsh-users
 help / color / mirror / code / Atom feed
* Missing options in tmux completion
@ 2016-03-15 13:36 Keerthan JC
  2016-03-15 13:52 ` Frank Terbeck
  0 siblings, 1 reply; 4+ messages in thread
From: Keerthan JC @ 2016-03-15 13:36 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 662 bytes --]

If I look at the source of _tmux:
https://github.com/zsh-users/zsh/blob/master/Completion/Unix/Command/_tmux#L628
(and my local _tmux), the options start from -A.

However, when I run tmux new -<Tab> I only see:
 -- option --
-D  -- in case of -A behave like attach-session's -d
-F  -- specify format of output
-P  -- print information about new session after it is created
-c  -- specify working directory for the session
-d  -- do not attach new session to current terminal
-n  -- name the initial window
-s  -- name the session
-t  -- specify target session
-x  -- specify width
-y  -- specify height


Why are some options missing?

-- 
have a nice day
-jck

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Missing options in tmux completion
  2016-03-15 13:36 Missing options in tmux completion Keerthan JC
@ 2016-03-15 13:52 ` Frank Terbeck
  2016-03-15 14:02   ` Keerthan JC
  0 siblings, 1 reply; 4+ messages in thread
From: Frank Terbeck @ 2016-03-15 13:52 UTC (permalink / raw)
  To: Keerthan JC; +Cc: zsh-users

Keerthan JC wrote:
> If I look at the source of _tmux:
> https://github.com/zsh-users/zsh/blob/master/Completion/Unix/Command/_tmux#L628
> (and my local _tmux), the options start from -A.
>
> However, when I run tmux new -<Tab> I only see:
>  -- option --
> -D  -- in case of -A behave like attach-session's -d
> -F  -- specify format of output
> -P  -- print information about new session after it is created
> -c  -- specify working directory for the session
> -d  -- do not attach new session to current terminal
> -n  -- name the initial window
> -s  -- name the session
> -t  -- specify target session
> -x  -- specify width
> -y  -- specify height
>
>
> Why are some options missing?

-A is an option to _arguments itself. I guess, we need to separate the
option lists from the options to _arguments by putting a colon in
between them. So in _tmux-new-session that would be:

  _arguments -s : $args

Would make sense to do that in all helper functions in _tmux that use
_arguments. I may take a look this evening, unless someone beats me to
it.


Regards, Frank

-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Missing options in tmux completion
  2016-03-15 13:52 ` Frank Terbeck
@ 2016-03-15 14:02   ` Keerthan JC
  2016-03-15 23:42     ` Frank Terbeck
  0 siblings, 1 reply; 4+ messages in thread
From: Keerthan JC @ 2016-03-15 14:02 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 1501 bytes --]

 `  _arguments -s : $args` does the trick. Thanks!

On Tue, Mar 15, 2016 at 9:52 AM, Frank Terbeck <ft@bewatermyfriend.org>
wrote:

> Keerthan JC wrote:
> > If I look at the source of _tmux:
> >
> https://github.com/zsh-users/zsh/blob/master/Completion/Unix/Command/_tmux#L628
> > (and my local _tmux), the options start from -A.
> >
> > However, when I run tmux new -<Tab> I only see:
> >  -- option --
> > -D  -- in case of -A behave like attach-session's -d
> > -F  -- specify format of output
> > -P  -- print information about new session after it is created
> > -c  -- specify working directory for the session
> > -d  -- do not attach new session to current terminal
> > -n  -- name the initial window
> > -s  -- name the session
> > -t  -- specify target session
> > -x  -- specify width
> > -y  -- specify height
> >
> >
> > Why are some options missing?
>
> -A is an option to _arguments itself. I guess, we need to separate the
> option lists from the options to _arguments by putting a colon in
> between them. So in _tmux-new-session that would be:
>
>   _arguments -s : $args
>
> Would make sense to do that in all helper functions in _tmux that use
> _arguments. I may take a look this evening, unless someone beats me to
> it.
>
>
> Regards, Frank
>
> --
> In protocol design, perfection has been reached not when there is
> nothing left to add, but when there is nothing left to take away.
>                                                   -- RFC 1925
>



-- 
have a nice day
-jck

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Missing options in tmux completion
  2016-03-15 14:02   ` Keerthan JC
@ 2016-03-15 23:42     ` Frank Terbeck
  0 siblings, 0 replies; 4+ messages in thread
From: Frank Terbeck @ 2016-03-15 23:42 UTC (permalink / raw)
  To: Keerthan JC; +Cc: zsh-users

Hi Keerthan,

Keerthan JC wrote:
>  `  _arguments -s : $args` does the trick. Thanks!

I just pushed a change¹ that should take care of all these cases in
_tmux. Thanks for reporting!


Regards, Frank

¹ workers/38161: http://www.zsh.org/mla/workers/2016/msg00696.html


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-03-16  1:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-15 13:36 Missing options in tmux completion Keerthan JC
2016-03-15 13:52 ` Frank Terbeck
2016-03-15 14:02   ` Keerthan JC
2016-03-15 23:42     ` Frank Terbeck

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).