Files
libvirt/tools/vsh-completer.h
T
Peter Krempa 8d1cd03478 virsh: completer: Extract common completer methods from virsh to vsh
The helper methods as well as the empty completers can be useful also in
other virt shells; extract the code and rename the functions
appropriately.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2025-05-21 15:49:36 +02:00

42 lines
1.3 KiB
C

/*
* vsh-completer.h: common virt shell completer callbacks
*
* Copyright (C) 2017 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see
* <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "vsh.h"
char **
vshEnumComplete(unsigned int last,
const char *(*intToStr)(int));
char **
vshCommaStringListComplete(const char *input,
const char **options);
char **
vshCompletePathLocalExisting(vshControl *ctl,
const vshCmd *cmd,
unsigned int completerflags);
char **
vshCompleteEmpty(vshControl *ctl,
const vshCmd *cmd,
unsigned int completerflags);