[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: プロンプトについて



Hajime Nosaka <nosaka@i-and-o.com> writes:

> そのユーザーのプロンプトを見ると、
> hostname: {**}(この{**}には数字が自動的に加算されていく)
> となるように設定されているようです。

数字の部分は history のイベント番号です。csh(1) の man page には
以下のように書いてあります。

     For example, consider the following output from the history command:

            9  write michael
           10  ex write.c
           11  cat oldwrite.c
           12  diff *write.c

     The commands are shown with their event numbers.  It is not usually nec-
     essary to use event numbers, but the current event number can be made
     part of the prompt by placing an `!' in the prompt string.

> いま、このプロントを、
> hostname >>
> というふうに変更したいのですが、
> どうすればよいのでしょうか?

> set prompt = "${mch:q}: {\!} "                 
>       �
> set prompt = "${mch:q}: >> "

これで OK だと思います。

-- やまの