-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
📺 Add zsh completions #514
base: main
Are you sure you want to change the base?
Conversation
'1:name:__mas_list_available' \ | ||
&& ret=0 | ||
;; | ||
open) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pattern never matches because of a previous pattern on line 17.
@@ -0,0 +1,165 @@ | |||
#! /usr/bin/env zsh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ShellCheck only supports sh/bash/dash/ksh scripts. Sorry!
Let me know if any of these reviews are an actual concern as most aren't applicable. |
} | ||
|
||
__mas_search_names() { | ||
[[ -z "$words[-1]" ]] && return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Argument to -z is always false due to literal strings.
} | ||
|
||
__mas_search_ids() { | ||
[[ -z "$words[-1]" ]] && return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Argument to -z is always false due to literal strings.
c6db308
to
63d0fe8
Compare
|
||
case "$state" in | ||
args) | ||
case $words[1] in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use braces when expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet).
@@ -0,0 +1,166 @@ | |||
#compdef mas | |||
# shellcheck shell=zsh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shell type is unknown. Use e.g. sh or bash.
#222 has been open for over 5 years now (🥳 congrats). About time someone took care of it, especially as it's the default shell.
Closes #222
Please let me know of any questions/suggestions you might have.