당신은 이미 아니라면
setopt prompt_subst
을 수행해야 할 수 있습니다.
또한, 탭의 진수 탈출을 해석하기 위해, $''
를 사용
PS4=$'+ $(date "+%s.%N")\011 '
이러한 이스케이프 중 일부는 유용하게 찾을 수 있습니다
:
%? The return status of the last command executed just before the prompt.
%_ The status of the parser, i.e. the shell constructs (like `if' and `for') that have been started on the command
line. If given an integer number that many strings will be printed; zero or negative or no integer means print as
many as there are. This is most useful in prompts PS2 for continuation lines and PS4 for debugging with the
XTRACE option; in the latter case it will also work non-interactively.
%i The line number currently being executed in the script, sourced file, or shell function given by %N. This is most
useful for debugging as part of $PS4.
%I The line number currently being executed in the file %x. This is similar to %i, but the line number is always a
line number in the file where the code was defined, even if the code is a shell function.
%L The current value of $SHLVL.
%N The name of the script, sourced file, or shell function that zsh is currently executing, whichever was started
most recently. If there is none, this is equivalent to the parameter $0. An integer may follow the `%' to spec‐
ify a number of trailing path components to show; zero means the full path. A negative integer specifies leading
components.
%x The name of the file containing the source code currently being executed. This behaves as %N except that function
and eval command names are not shown, instead the file where they were defined.
이 지금 당신을 위해 작동하지 않는 곳 관련성 찾아 표시 '이 예제 대답 프롬프트 섹션'을 포함하도록 게시물을 수정하십시오 참조하십시오. 행운을 빕니다. – shellter
기본적으로 사용자 정의를 사냥하면 내 프롬프트 앞에 앞에 zsh 동등성이 번역되어 있어야합니다. : D 나는 약 1 년 동안 그것을 커스터마이징하지 않았기 때문에 나는 oh-my-zsh 커스터마이징 내에 그것을 묻어 놓은 부분을 다시 파헤쳐 야합니다. – ylluminate