找不到zsh:strftime命令

Nil*_*ann 5 command-line zsh strftime

我目前正在学习zsh,现在我想使用strftime但是我得到:

zsh: command not found: strftime

我想我做错了什么,因为我看到人们一直在他们的dotfiles中使用这个功能.

Pau*_*ce. 7

strftime在一个zsh名为的模块中定义datetime.该zmodload命令从冒号分隔的目录列表中加载模块$module_path.

在我的系统上:

% echo $module_path
/usr/lib/zsh/4.3.10
% ls -l $module_path
drwxr-xr-x 3 root root 4096 2009-11-05 01:03 zsh
% ls -l $module_path/zsh/datetime*
-rw-r--r-- 1 root root 9828 2009-09-10 02:45 /usr/lib/zsh/4.3.10/zsh/datetime.so
% type -a strftime
strftime not found
% zmodload zsh/datetime
% strftime %Y-%m-%d 1271603087
2010-04-18
% type -a strftime
strftime is a shell builtin
% /bin/date -d @1271603087 +%Y-%m-%d
2010-04-18
Run Code Online (Sandbox Code Playgroud)