Repository: clap-rs/clap (language: rust)

Issue:
Bash completion no longer completes arg possible_values
### Please complete the following tasks

- [X] I have searched the [discussions](https://github.com/clap-rs/clap/discussions)
- [X] I have searched the [open](https://github.com/clap-rs/clap/issues) and [rejected](https://github.com/clap-rs/clap/issues?q=is%3Aissue+label%3AS-wont-fix+is%3Aclosed) issues

### Rust Version

1.60.0

### Clap Version

3.1.16 (clap) 3.1.3 (clap_complete)

### Minimal reproducible code

```rust
use clap::*;
use clap_complete::*;

fn main() {
    let mut cli = App::new("foo").arg(Arg::new("foo").long("foo").possible_values(&["bar", "baz"]));
    generate(Shell::Bash, &mut cli, "foo", &mut std::io::stdout());
}
```


### Steps to reproduce the bug with the above code

`cargo run | rg -C1 COMPREPLY`

### Actual Behaviour

```
                --foo)
                    COMPREPLY=($(compgen -W "" -- "${cur}"))
                    return 0
```

### Expected Behaviour

```
                --foo)
                    COMPREPLY=($(compgen -W "bar baz" -- "${cur}"))
                    return 0
```

### Additional Context

This is a regression introduced in `clap_complete 3.1.1`. Versions 3.1.0 and earlier (including 2.x series I'm currently upgrading from) are fine.

### Debug Output

_No response_


Discussion / hints:

Fix patch:
diff --git a/clap_complete/src/shells/bash.rs b/clap_complete/src/shells/bash.rs
index 08bf1190cc3..a95047df7e3 100644
--- a/clap_complete/src/shells/bash.rs
+++ b/clap_complete/src/shells/bash.rs
@@ -178,7 +178,7 @@ fn vals_for(o: &Arg) -> String {
         format!(
             "$(compgen -W \"{}\" -- \"${{cur}}\")",
             vals.iter()
-                .filter(|pv| pv.is_hide_set())
+                .filter(|pv| !pv.is_hide_set())
                 .map(PossibleValue::get_name)
                 .collect::<Vec<_>>()
                 .join(" ")


Test patch:
diff --git a/clap_complete/tests/snapshots/sub_subcommands.bash b/clap_complete/tests/snapshots/sub_subcommands.bash
index c39eb589e66..85729508196 100644
--- a/clap_complete/tests/snapshots/sub_subcommands.bash
+++ b/clap_complete/tests/snapshots/sub_subcommands.bash
@@ -94,7 +94,7 @@ _my-app() {
             fi
             case "${prev}" in
                 --config)
-                    COMPREPLY=($(compgen -W "" -- "${cur}"))
+                    COMPREPLY=($(compgen -W "Lest quotes aren't escaped." -- "${cur}"))
                     return 0
                     ;;
                 *)
diff --git a/clap_complete/tests/snapshots/value_hint.bash b/clap_complete/tests/snapshots/value_hint.bash
index 4138007acfc..39e8208b864 100644
--- a/clap_complete/tests/snapshots/value_hint.bash
+++ b/clap_complete/tests/snapshots/value_hint.bash
@@ -26,7 +26,7 @@ _my-app() {
             fi
             case "${prev}" in
                 --choice)
-                    COMPREPLY=($(compgen -W "" -- "${cur}"))
+                    COMPREPLY=($(compgen -W "bash fish zsh" -- "${cur}"))
                     return 0
                     ;;
                 --unknown)