Skip to content
Advertisement

Tag: ps1

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

Replacement of PS1 variable in .bashrc using Sed or Perl

I am trying to replace a line in file and am running in to issues. Original File: Command I am running: Error message: I also tried sed: Result with Sed: Expected Result File: End Result This doesn’t have much to do with the question except to show folks what the PS1 will look like when working properly Answer For sed,

Advertisement