Skip to content
Advertisement

Tag: zshrc

Prompt Expansion ZSH Remove Hostname if entire PROMPT is too long

Currently, my zshrc looks like this influenced by this question and my other question what is currently working as expected it truncates the hostname and the username to constant values it dynamically truncates the entire PROMPT based on widthHelper() which allows me to resize my terminal and dynamically truncate the PROMPT Currently, I have this line working but not in

how to avoid enviroment variable from resetting in WSL terminal after restart?

environment variable set (in zsh shell) in WSL disappears after restarting the terminal. I have used to set environment variable. how should I avoid env variable from resetting after restart. Answer I added environment variable in .zshrc file after reading comment of @Biswapriyo. like this- export variable_name=variable_value and now it works. I think, at every startup, scripts in .zshrc file

Advertisement