-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Description
Some of the sample fish prompts (in share/tools/web_config) run hostname every time the prompt is displayed. That command can be slow if, for example, there is a problem with DNS. All of the prompts should use this pattern:
# Just calculate this once, to save a few cycles when displaying the prompt
if not set -q __fish_prompt_hostname
set -g __fish_prompt_hostname (hostname|cut -d . -f 1)
end
That's from share/functions/fish_prompt.fish. Obviously we can now do it slightly faster using the string builtin.
This issue was triggered by issue #3479.
Reactions are currently unavailable