(prefix, ffc, fc, out=None)
| 13 | |
| 14 | |
| 15 | def equal_with_bash(prefix, ffc, fc, out=None): |
| 16 | res = ffc(prefix) |
| 17 | res_bash = set(fc(prefix)) |
| 18 | retval = set(res) == res_bash |
| 19 | if out: |
| 20 | out.write(fclass="st">"equal_with_bash({prefix}) {retval} {res}\n") |
| 21 | if not retval: |
| 22 | out.write(class="st">" python - bash: %s\n" % (set(res) - res_bash)) |
| 23 | out.write(class="st">" bash - python: %s\n" % (res_bash - set(res))) |
| 24 | return retval |
| 25 | |
| 26 | |
| 27 | class="cm"># Copied from argcomplete.completers as import from there. |
no test coverage detected