rust-dc / fish-manpage-completions

Straight port of fish-shell's Python manpage completion script to Rust
19 stars 8 forks source link

feat(main): tackling the final 😈 (WIP) #106

Closed scooter-dangle closed 3 years ago

pickfire commented 4 years ago

Oh, unicode branch name. I didn't know branch name could be unicode.

pickfire commented 4 years ago

I just realized most of the parsers are not working, I fixed DeroffParser which have some bugs where take_while created some issue when taking the current item, took me quite some time to fix.

scooter-dangle commented 4 years ago

Copied from Zulip:

Hmm. When looking at how we handle fixtures/mlterm.1, seems to be 2 distinct bugs.

1) When I use the --deroff-only flag, I get output (using --stdout) that looks like the actual completion outputs. This is due to the deroff_only field only triggering an explicit selection of the ManType::TypeDeroff variant (https://github.com/rust-dc/fish-manpage-completions/blob/43844c38c9404c5997a71782930539ba0a6b92d7/src/main.rs#L1315) but then not cutting off things off after doing the deroff step.

2) Excluding the --deroff-only flag helps to illustrate that we have another issue, I think, which is that something in our port of the conditional logic to determine which ManType isn't correctly getting us to ManType::TypeDeroff. I haven't checked yet to see which of the other ManTypes that precede it in ManType::ALL is being selected.

pickfire commented 4 years ago
  1. When I use the --deroff-only flag, I get output (using --stdout) that looks like the actual completion outputs. This is due to the deroff_only field only triggering an explicit selection of the ManType::TypeDeroff variant (

That's because I double check and fixed the bugs in TypeDeroff, I didn't check the other deroffers yet, let me check it and fix the other bugs.

  1. Excluding the --deroff-only flag helps to illustrate that we have another issue, I think, which is that something in our port of the conditional logic to determine which ManType isn't correctly getting us to ManType::TypeDeroff. I haven't checked yet to see which of the other ManTypes that precede it in ManType::ALL is being selected.

Fixed in https://github.com/rust-dc/fish-manpage-completions/pull/106/commits/b90a3d25b170571b36407f442dcbc3fba3e9dd25

pickfire commented 3 years ago

Oh, I just realized original python Type2 and Type3 will always fail even though it runs successfully, I don't even know why it is there.

pickfire commented 3 years ago

Now I am also planning to match new features in upstream https://github.com/rust-dc/fish-manpage-completions/issues/105 WIP. CC @charliethomson

pickfire commented 3 years ago

I believe this should be good enough such that even bugs I noticed is fixed.

Next is to get https://github.com/rust-dc/fish-manpage-completions/pull/107 merged and I will start working on logging.

In the mean time, @scooter-dangle I will add hacktoberfest label to encourage bug fixes. I can't add hacktoberfest label to the project.