pw-cli: use readline() in interactive mode

With history and a simple command completion hook this makes the
interactive mode a lot easier to deal with.
This commit is contained in:
Peter Hutterer 2021-09-27 07:33:19 +10:00 committed by Wim Taymans
parent 7d58ce9e24
commit ae59185f6f
3 changed files with 100 additions and 35 deletions

View file

@ -1,6 +1,5 @@
tools_sources = [
[ 'pw-mon', [ 'pw-mon.c' ] ],
[ 'pw-cli', [ 'pw-cli.c' ] ],
[ 'pw-dot', [ 'pw-dot.c' ] ],
[ 'pw-dump', [ 'pw-dump.c' ] ],
[ 'pw-profiler', [ 'pw-profiler.c' ] ],
@ -18,6 +17,14 @@ foreach t : tools_sources
)
endforeach
if readline_dep.found()
executable('pw-cli',
'pw-cli.c',
install: true,
dependencies: [pipewire_dep, readline_dep]
)
endif
if ncurses_dep.found()
executable('pw-top',
'pw-top.c',