[PATCH 3/3] zsh-completion: Add --monitor-stream completion to pacat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2013-10-29 at 19:13 +0100, poljar (Damir Jeli?) wrote:
> On Tue, Oct 29, 2013 at 07:51:26PM +0200, Tanu Kaskinen wrote:
> > On Thu, 2013-08-15 at 14:08 +0200, poljar (Damir Jeli?) wrote:
> > > ---
> > >  shell-completion/pulseaudio-zsh-completion.zsh | 2 ++
> > >  1 file changed, 2 insertions(+)
> > > 
> > > diff --git a/shell-completion/pulseaudio-zsh-completion.zsh b/shell-completion/pulseaudio-zsh-completion.zsh
> > > index e872736..abc443a 100644
> > > --- a/shell-completion/pulseaudio-zsh-completion.zsh
> > > +++ b/shell-completion/pulseaudio-zsh-completion.zsh
> > > @@ -36,6 +36,7 @@ _devices() {
> > >                      cmd=('sinks' 'sources')
> > >                  fi
> > >                  ;;
> > > +            --monitor-stream=*) cmd=('sink-inputs');;
> > >          esac
> > >  
> > >          case $words[$((CURRENT - 1))] in
> > > @@ -468,6 +469,7 @@ _pacat_completion() {
> > >          {-p,--playback}'[create a connection for playback]' \
> > >          {-s,--server=}'[name of server to connect to]:host:_hosts' \
> > >          {-d,--device=}'[name of sink/source to connect to]:device:_devices' \
> > > +        '--monitor-stream=[index of the sink input to record from]:device:_devices' \
> > 
> > "device:_devices" probably isn't right?
> > 
> 
> Yes it is right. 
> 
> The _devices() function returns a list of devices based on the calling 
> executable name (the $service variable holds this name) and on the argument.
> You can see that the cmd variable is filled with only 'sink-inputs' and 
> this is then passed to pactl (the big for loop "for target in $cmd; do").
> 
> It is a little bit confusing and in retrospect many smaller functions
> would have been better (like it was done for the bash completion) but it
> does work. :P

OK, thanks for the clarification. I have now applied the patch.

-- 
Tanu



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux