zsh-completion error : showing usage: date [-jnu] ...
#5839
Labels
outdated
PR was locked due to age
usage: date [-jnu] ...
#5839
Please note that we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.
brew
command and reproduced the problem with multiple formulae? If it's a problem with a single, official formula (not cask) please file this issue at Homebrew/homebrew-core: https://github.com/Homebrew/homebrew-core/issues/new/choose. If it's abrew cask
problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.brew update
and can still reproduce the problem?brew doctor
, fixed all issues and can still reproduce the problem?brew config
andbrew doctor
and included their output with your issue?What you were trying to do (and why)
I'm trying to use the autocompletion of homebrew and got some error output.
What happened (include command output)
When I hit the tab to auto complete, I constantly get the following output.
Command output
Issue description and proposed solution
This error will not appear in Linux system (or maybe newer Mac OS). My system is Mac OS 10.10.5 and the
date
command is different than the one in the Linux system.This issue is caused by the
date -r "$1" +s
command in the__brew_completion_caching_policy()
function in the_brew
file. By the detailed output I posted above, the-r
parameter should be followed by "seconds" rather than a file name. So I propose to usestat -f "%m" "$1"
instead. One can define the following functionand replace the
__brew_completion_caching_policy()
byThe text was updated successfully, but these errors were encountered: