Commit graph

47 commits

Author SHA1 Message Date
Igor V. Kovalenko
13ea94a1b6 shell-completion: Fix typo in --use-pid-file= suggestion
Fixes #3786

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/799>
2023-10-24 22:53:51 +03:00
hashitaku
ffbcf36854 shell-completion: add new subcommand get-* for zsh
Added to shell-completion of zsh as there is no completion for the subcommand get-*.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/735>
2022-08-01 18:34:25 +00:00
hashitaku
9f725cafb8 shell-completion: add new subcommand get-* for bash
Added to shell-completion of bash as there is no completion for the subcommand get-*.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/735>
2022-08-01 18:34:25 +00:00
Igor V. Kovalenko
5f43173209 build-sys: meson: Rearrange shell completion between daemon and client
Rename bash completion file to pactl and install it with client build.
Completions specific to daemon are now just symlinks, create target directory
first to install them.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/659>
2021-11-17 16:06:23 +00:00
Igor V. Kovalenko
6928714b64 build-sys: meson: change daemon-only to client
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/659>
2021-11-17 16:06:23 +00:00
Mart Raudsepp
4cf4a1fd5b build-sys: meson: Allow building the daemon only
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/659>
2021-11-17 16:06:23 +00:00
Sibo Dong
53e3b53408 shell-completion: bash: Localize word variable
The word variables used in the _pactl and _pacmd functions are
unlocalized. Thus, the variable appears in the user's environment when
tab-completing with pactl or pacmd. This may clobber another variable
of the same name, which is undesirable.

Localize the word variable to fix this issue.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/623>
2021-08-25 15:54:35 +00:00
Igor V. Kovalenko
424580a901 build-sys: meson: allow building client libraries only
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/540>
2021-04-19 18:48:59 +00:00
pseyfert
d74c47340a fix handling of symbolic port names in zsh completion
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/500>
2021-02-15 15:06:35 +00:00
Paul Seyfert
faa1a7e042 zsh-completion Add completion of sample names
This closes #201.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/501>
2021-02-10 19:37:07 +01:00
Georg Chini
4a28b164d1 pactl: Implement list message-handlers
For better readability, "pactl list message-handlers" is introduced which
prints a formatted output of "pactl send-message /core list-handlers".

The patch also adds the functions pa_message_params_read_raw() and
pa_message_params_read_string() for easy parsing of the message response
string. Because the functions need to modify the parameter string,
the message handler and the pa_context_string_callback function now
receive a char* instead of a const char* as parameter argument.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/51>
2020-12-03 14:41:39 +00:00
Georg Chini
68f2f1395d pactl, pacmd, cli-command: Add send-message command
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/51>
2020-12-03 14:41:39 +00:00
Felix Yan
1887a0f88b shell-completion: zsh: Correct a typo 2020-08-14 22:31:33 +08:00
Jarno Suni
2afadb7119 shell-completion: Do not use 'awk -e' in bash completion
mawk does not support  option -e. If mawk is the default awk,
like it is in Ubuntu by default, the completion does not work.
2020-01-30 12:36:38 +02:00
Jarno Suni
a6beb3f4bf shell-completions/bash: Add pactl set-default-sink and set-default-source
pactl has these commands, too. Use the same order as the
man page, except the undocumented 'help'. Note that the commands are
sorted alphabetically when completed anyway, though
that can be disabled since Bash 4.4
(https://unix.stackexchange.com/q/215937/111181)

The zsh completions already support set-default-sink and
set-default-source.
2020-01-30 09:02:45 +02:00
Timo Gurr
7670dffe59 meson: allow to disable installing completions 2019-11-07 12:50:56 +00:00
Arnaud Rebillout
8146f87808 meson: Fix various install scripts
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2019-06-08 11:57:00 +02:00
Arnaud Rebillout
8d241d62c5 meson: Install completion files
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
2019-06-08 11:57:00 +02:00
Paul Seyfert
a4bc0227b3 shell-completion: update zsh completion for pasuspender
* remove suggestion of '-C' due to incorrect ordering of options for
   _arguments
 * avoid suggesting multiple options
 * add suggestion of "--", followed by executable programs
 * after "--server=<hostname>" or "-s <hostname>" suggest "--"
 * after "-- <program>" continue standard tab completion

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=98639
2017-01-19 03:00:45 +02:00
Ahmed S. Darwish
d2a6afcab3 core: Support memfd transport; bump protocol version
Now that all layers in the stack support memfd blocks, add memfd
support for the daemon's global core mempool. Also introduce
"enable-memfd=" daemon argument and configuration option.

For now, memfd support is an opt-in feature to be activated only
when daemon's enable-memfd= is set to yes.

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
2016-04-27 18:37:08 +05:30
Arun Raghavan
ff5e7b8707 shell-completion: bash: Fix pactl list source-outputs 2015-02-03 11:33:45 +05:30
Tanu Kaskinen
7d9e792d16 shell-completion: zsh: Fix the set-card-profile description 2014-11-14 14:24:13 +02:00
Tanu Kaskinen
f48c16113a shell-completion: zsh: Fix set-default-sink/source completion
The _devices() function didn't recognize the set-default-* commands,
and as a result it didn't generate any completions.
2014-11-14 14:24:10 +02:00
Peter Meerwald
6d1fd4d1aa pactl: Remove deprecated 'stat' behaviour
the stat command should only output statistics, not info

behaviour was deprecated anno 2011 in 8ace9185 "pactl: Make stat backwards
compatible" -- fix this now

v2: (thanks Tanu Kaskinen):
* adjust shell completion

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
2014-11-04 22:22:19 +01:00
Michał Górny
ee4bbe5cd3 build-sys: Alias bash-completion for all PulseAudio commands
Bash-completion 1.90 introduced support for on-demand loading
of completions. Install the completion file as 'pulseaudio' to match
the main command, and create symlinks as aliases for other supported
commands in order to support the new system.
2014-10-28 12:48:38 +02:00
Tanu Kaskinen
eaa80baea9 shell-completion: zsh: Rework pactl completion
So far the command name has been figured out by looking one or two
items back in the $words array, but I needed a way to figure out the
command given an arbitrary number of parameters. I was implementing
a command for removing devices from the device-manager database, and
the command would take a list of devices. Since the number of devices
that need to be completed can be arbitrarily large, the previous "look
one or two words back" approach didn't work.

This new approach is more verbose, but I think it's also easier to
follow. There's some duplication that would be easy to avoid by
merging some of the commands, but I decided to not do that, to make
it more obvious what the code does.
2014-10-26 21:00:26 +02:00
Tanu Kaskinen
414646769d shell-completion: zsh: Mark a variable as local
Variables are global by default, and we certainly don't want
_pactl_commands to be a global variable.
2014-10-26 21:00:23 +02:00
Tanu Kaskinen
64d17a6b0a shell-completion: zsh: Add "=" to the end of some command options
Without the equals sign, only the "--server foo" form is recognized,
so the "--server=foo" form doesn't get completion support.
2014-08-17 09:30:16 +03:00
Tanu Kaskinen
db6d5011cd shell-completion: zsh: Use -S and -A with _arguments
-S makes the option parser to not try parsing arguments as options
after "--" has appeared in the command line.

-A "-*" makes the option parser to not try parsing arguments as
options after the first non-option argument. The "-*" pattern means
that if there are unrecognized parameters that look like options
(i.e. start with a dash), those should not terminate the option
parsing.
2014-08-17 09:30:16 +03:00
Tanu Kaskinen
cd3cae9285 shell-completion: zsh: Don't use multiple option sets for one command
The options were divided to multiple sets to prevent (or at least try
to prevent) completing e.g. --server after -s was already given. This,
however, caused problems, because after the user had written
"pactl --server foo", further completions stopped to work. The
"server" option set didn't contain any other options, so once Zsh
detected that the "server" option set was in use, it thought that no
other options were valid.

The special casing for "-s", "-n", "--server" and "--client-*" at the
end of _pactl_completion() was probably an attempt to deal with this
problem. Those special cases are unnecessary now that the option
specification given to _arguments is more correct.
2014-08-17 09:26:55 +03:00
Tanu Kaskinen
74c724db05 shell-completion: zsh: Don't say "this help" when it's a different help
The option descriptions that Zsh prints are not the same thing as the
help text that pactl, pacmd etc. print when given --help.
2014-08-17 09:20:51 +03:00
Tanu Kaskinen
1f9d4cbe93 shell-completion: zsh: Support also --server in remote detection
_set_remote() is supposed to find out if a remote server has been
specified on the command line, but previously it only checked for -s
and ignored --server, causing the completion code to connect to the
local server instead when it should have connected to the remote
server to get the data for the completions.
2014-08-17 09:20:51 +03:00
Tanu Kaskinen
09e9d13e2d shell-completion: zsh: Move duplicated code into a function
This is just refactoring, no functional changes.
2014-08-17 09:20:51 +03:00
Tanu Kaskinen
be8171be79 shell-completion: Install the Zsh completions
This makes the Zsh completions work out-of-the-box. I also moved
pulseaudio-zsh-completion.zsh to zsh/_pulseaudio to be in line with
the common naming convention of Zsh completion files.
2014-08-17 08:24:47 +03:00
Felipe Sateler
3be8382fcd zsh-completion: Fix completion for default sink/source 2014-07-03 17:09:56 +05:30
Tanu Kaskinen
7978b9c242 shell-completion: Add completion for parec
Thanks to Damir Jelić for fixes in the zsh completion.
2014-05-25 10:52:05 +03:00
poljar (Damir Jelić)
6e4335cc71 zsh-completion: Add --monitor-stream completion to pacat 2013-10-29 20:59:32 +02:00
poljar (Damir Jelić)
b49298c51e zsh-completion: Fix pacat device completion
The pacat completion didn't complete the right devices for the --record
and --playback flags.

This patch fixes this and makes the device completion for pacat easily
expandable.
2013-10-29 19:47:06 +02:00
poljar (Damir Jelić)
47729c43b4 bash-completion: Add --monitor-stream completion to pacat 2013-10-29 19:46:18 +02:00
poljar (Damir Jelić)
bf9b3f0720 bash-completion: Fix device completion for pacat
The Bash shell completion for pacat --device combines the name of the
last sink and the name of the first source. This patch fixes that by
adding a whitespace separator in the list of devices.

Buglink: https://bugs.freedesktop.org/show_bug.cgi?id=68106
2013-08-15 10:03:40 +03:00
poljar (Damir Jelić)
126a80f3b9 shell-completion: Add list-cards to the pacmd completion.
The list-cards command was missing for both of the shell completions.
This fixes it.
2013-06-04 00:38:43 +05:30
poljar (Damir Jelić)
ada92732f0 zsh-completion: Fix pacat completion.
pacat --format needs = (--format=).
Also pacat should complete files firstly and command line arguments
secondly.
2013-03-18 21:28:21 +02:00
poljar (Damir Jelić)
d127e801dc zsh-completion: Add support for the new pactl commands.
This adds support for set-(sink|source)-default completion and adds
toggle to the supported arguments for the mute command.
2013-03-18 21:25:59 +02:00
poljar (Damir Jelić)
993e756e13 zsh-completion: Add support for remote servers.
This patch adds support for completion of remote PulseAudio server
arguments it also suppresses error messages when unable to connect to
PulseAudio (only for the completion function).
2013-03-18 21:25:56 +02:00
poljar (Damir Jelić)
a5af95f83d bash-completion: Don't complete devices in the list commands
This fixes some wrong completion for the list commands for example:
    pactl list sinks _sink_name_
2013-02-01 07:11:15 +02:00
poljar (Damir Jelić)
dfa7a6fff1 build: Add bash completion
This patch adds bash completion for pulseaudio and all of the utilities.
Channel maps and properties are not yet completed.

This should make mostly pactl/pacmd more useful for bash users.

Thanks to Denis Kasak for the awk magic (fetching ports and profiles
from the card info).
2013-01-31 05:19:48 +02:00
poljar (Damir Jelić)
b877021845 build: Add zsh completion
This patch adds zsh completion for pulseaudio and all of the utilities.
Channel maps and properties are not yet completed.

This should make mostly pactl/pacmd more usefull for zsh users.
2013-01-28 15:31:34 +02:00