Replies: 1 comment 1 reply
-
`complete -c yabai -f -s 'm' -l 'message' -n '__fish_not_contain_opt -s m message' -ra "$domain"`
While this does limit the use of the message flag, it doesn't auto complete the value. What am I missing here?
Adding logic like "don't complete the option if it's already given" is fine but I wouldn't bother with it.
The uniqueness constraint is usually obvious to the user and rarely a problem.
That being said, you can try to write something like `not __fish_contain_opt_with_arg` so the whole thing is only disabled when `-m` and argument is present
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I have a question that is probably stupid, but I am having a hard time figuring it out.
I am working on completions for yabai and I'm trying to setup a completion for the message flag. I want you to only be able to specify the message once and also have it require a value. I currently have something like this:
complete -c yabai -f -s 'm' -l 'message' -n '__fish_not_contain_opt -s m message' -ra "$domain"
While this does limit the use of the message flag, it doesn't auto complete the value. What am I missing here?
Beta Was this translation helpful? Give feedback.
All reactions