ふり返る暇なんて無いね

日々のメモ書きをつらつらと。メインブログに書くほどでもないことを流してます

build-in commandのmanが引けなくて困った

zshの話です。

historyコマンドのmanpageを引きたくて以下のようにコマンドを打ったところ、

man history

builtinのmanpageが表示されて、そうじゃないんだよなあ。。。ってなってました。 See the built-in command description in the appropriate shell manual page. 言われても。。。。

BUILTIN(1)                  General Commands Manual                 BUILTIN(1)

NAME
     builtin, !, %, ., :, @, [, {, }, alias, alloc, bg, bind, bindkey, break,
     breaksw, builtins, case, cd, chdir, command, complete, continue, default,
     dirs, do, done, echo, echotc, elif, else, end, endif, endsw, esac, eval,
     exec, exit, export, false, fc, fg, filetest, fi, for, foreach, getopts,
     glob, goto, hash, hashstat, history, hup, if, jobid, jobs, kill, limit,
     local, log, login, logout, ls-F, nice, nohup, notify, onintr, popd,
     printenv, printf, pushd, pwd, read, readonly, rehash, repeat, return,
     sched, set, setenv, settc, setty, setvar, shift, source, stop, suspend,
     switch, telltc, test, then, time, times, trap, true, type, ulimit, umask,
     unalias, uncomplete, unhash, unlimit, unset, unsetenv, until, wait,
     where, which, while – shell built-in commands

SYNOPSIS
     See the built-in command description in the appropriate shell manual
     page.

zshでbuilt-in commandsを調べたいときは以下のようにするのが正しいです。

man zshbuiltins

ちなみに fc -lhistory は同じだそうです。

       history
              Same as fc -l.