diff --git a/plugins/wakeonlan/_wake b/plugins/wakeonlan/_wake new file mode 100644 index 000000000..4ab10d374 --- /dev/null +++ b/plugins/wakeonlan/_wake @@ -0,0 +1,4 @@ +#compdef wake +#autoload + +_arguments "1:device to wake:_files -W '$HOME/.wakeonlan'" && return 0 diff --git a/plugins/wakeonlan/wakeonlan.plugin.zsh b/plugins/wakeonlan/wakeonlan.plugin.zsh index 8406b8f7d..6cef7d44a 100644 --- a/plugins/wakeonlan/wakeonlan.plugin.zsh +++ b/plugins/wakeonlan/wakeonlan.plugin.zsh @@ -12,7 +12,3 @@ function wake() { wakeonlan -f "$config_file" } - -if (( $+functions[compdef] )); then - compdef "_arguments '1:device to wake:_files -W '\''$HOME/.wakeonlan'\'''" wake -fi