Skip to content

Shell prompt has very notable delay #104

@ZyX-I

Description

@ZyX-I

Subj. I can now suggest two things: first, use one call for both PS1 and RPS1 (with eval used to get the result back). It will get rid of the delay between times when PS1 and RPS1 is shown, but won’t get rid of the issue.

Second, make script not evaluated each time prompt is shown. If nothing useful is suggested here or I fail to invent better idea I will probably write a PR with something based on zsh/zpty (overkill, but I see no better options). Bash users will have to invent something on their own.

Though I already though about another idea: writing zsh/zpython C module that will provide commands similar to python/python3 in vim (meaning that python is initialized once module is loaded).

Note: time shows the following for PS1 side:

0,07s user 0,01s system 93% cpu 0,086 total

. I guess “notable delay” consists almost solely of python initialization and I notice it even is PS1 is simple python -c 'print "abc"' (0,02s user 0,00s system 91% cpu 0,026 total).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions