summaryrefslogtreecommitdiffstats
path: root/etc/mpv.bash-completion
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2023-07-18 10:50:09 +0200
committersfan5 <sfan5@live.de>2023-07-19 13:01:08 +0200
commit5f664e2a1d8c53375818f959e972291a539c77a1 (patch)
tree56070f64dd91ccae9d0adf37010643d96b78de0b /etc/mpv.bash-completion
parentda9c94989a509557044791c70c670865a15fc8f7 (diff)
downloadmpv-5f664e2a1d8c53375818f959e972291a539c77a1.tar.bz2
mpv-5f664e2a1d8c53375818f959e972291a539c77a1.tar.xz
bash-completion: do not complete removed options
Diffstat (limited to 'etc/mpv.bash-completion')
-rw-r--r--etc/mpv.bash-completion9
1 files changed, 6 insertions, 3 deletions
diff --git a/etc/mpv.bash-completion b/etc/mpv.bash-completion
index f33caf60e0..c08010ae7c 100644
--- a/etc/mpv.bash-completion
+++ b/etc/mpv.bash-completion
@@ -73,9 +73,12 @@ _mpv_get_args()
}
# This regex detects special options where we don't want an '=' appended
-_mpv_special_regex='Flag.*\[not in config files\]|Print'
-_mpv_regular_options=($(echo "$_mpv_options" | grep -v -E "$_mpv_special_regex" |awk '{print "\\"$1;}' | grep '\--'))
-_mpv_special_options=($(echo "$_mpv_options" | grep -E "$_mpv_special_regex" |awk '{print "\\"$1;}' | grep '\--'))
+_mpv_special_regex='\s(Flag.*\[not in config files\]|Print)'
+_mpv_skip_regex='\sremoved \[deprecated\]'
+_mpv_regular_options=($(echo "$_mpv_options" | grep -vE "$_mpv_skip_regex" | \
+ grep -vE "$_mpv_special_regex" | awk '{print "\\"$1;}' | grep '\--'))
+_mpv_special_options=($(echo "$_mpv_options" | grep -vE "$_mpv_skip_regex" | \
+ grep -E "$_mpv_special_regex" | awk '{print "\\"$1;}' | grep '\--'))
_mpv()
{