choose
choose copied to clipboard
I added tab completions for fish shell
Hi! Cool project, I like it! And easy to use, too, but with tab completions it is even easier. I added some for fish shell:
complete choose --no-files
#flags:
complete choose -s c -l character-wise -d "Choose fields by character number"
complete choose -s d -l debug -d "Activate debug mode"
complete choose -s x -l exclusive -d "Use exclusive ranges, similar to array indexing in many programming languages"
complete choose -x -s h -l help -d "Prints help information"
complete choose -s n -l non-greedy -d "Use non-greedy field separators"
complete choose -l one-indexed -d "Index from 1 instead of 0"
complete choose -s V -l version -d "Prints version information"
#options:
complete choose -x -s f -l field-separator -d "Specify field separator other than whitespace, using Rust `regex` syntax"
complete choose -r -s i -l input -d "Specify input file"
complete choose -x -s o -l output-field-separator -d "Specify output field separator"
Do you want to bundle them with the project, or would you like me to create a pull request in the fish shell repo instead?
I personally don't use fish shell but am happy to have completions for those who do. What is the recommended/idiomatic way to distribute them? I imagine adding them to fish shell makes it so every user will automatically have them without any additional work, so that might be simpler? But if bundling here is better for some reason I am open to it.
I assume bundling is better/necessary if the interface changes often, and if the command is named differently depending on the platform. I think neither is the case here, so I will create a PR for the fish shell repo. (Still wanted to give you the choice, though.)
Yeah the command name is the same on all platforms, and I'm not planning any upcoming changes to options or features. Some may occur but it will be a pretty slow pace if they do. Seems like fish pr is best.