1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-10-13 22:10:23 +02:00
Files
flashrom/util/flashrom.bash-completion.tmpl
Anastasia Klimchuk 81e5b58a20 util: Use SPDX in headers
Change-Id: I7b4b3da3b47b90c2113bbe614e47892e9cc29417
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/89418
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Antonio Vázquez Blanco <antoniovazquezblanco@gmail.com>
2025-10-12 05:07:45 +00:00

68 lines
1.2 KiB
Cheetah

# Completion file for bash
#
# This file is part of the flashrom project.
#
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: 2022 Alexander Goncharov <chat@joursoir.net>
_flashrom()
{
local cur prev OPTS
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
'-r'|'--read'|'-w'|'--write'|'-v'|'--verify'|'-l'|'--layout'| \
'--fmap-file'|'-o'|'--output'|'--flash-contents')
local IFS=$'\n'
compopt -o filenames
COMPREPLY=( $(compgen -f -- $cur) )
return 0
;;
'-c'|'--chip'|'--wp-range'|'--wp-region'|'-i'|'--include')
return 0
;;
'-p'|'--programmer')
COMPREPLY=( $(compgen -W "@PROGRAMMERS@" -- $cur) )
return 0
;;
'-h'|'--help'|'-R'|'--version'|'-L'|'--list-supported')
return 0
;;
esac
OPTS="--help
--version
--read
--write
--verify
--erase
--verbose
--chip
--force
--noverify
--noverify-all
--extract
--layout
--wp-disable
--wp-enable
--wp-list
--wp-status
--wp-range
--wp-region
--flash-name
--flash-size
--fmap
--fmap-file
--ifd
--include
--output
--flash-contents
--list-supported
--progress
--programmer"
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
return 0
}
complete -F _flashrom flashrom