Skip to main content
added 4 characters in body
Source Link
Murphy
  • 2.7k
  • 1
  • 16
  • 22

Not a solution to shorten long paths, but a convenient way to get a better overview while keeping all path information visible, is adding a newline before the last character. This way the cursor isstarts always in the same column, even if the path is long enough to wrap around, but your console window(s) should be high enough to not scroll out the previous lines too quickly. I removed the color codes for more clarity:

murphy@seasonsend:~
$ echo $PS1
\u@\h:\w\n\$
murphy@seasonsend:~
$ 

Not a solution to shorten long paths, but a convenient way to get a better overview while keeping all path information visible, is adding a newline before the last character. This way the cursor is always in the same column, even if the path is long enough to wrap around, but your console window(s) should be high enough to not scroll out the previous lines too quickly. I removed the color codes for more clarity:

murphy@seasonsend:~
$ echo $PS1
\u@\h:\w\n\$
murphy@seasonsend:~
$ 

Not a solution to shorten long paths, but a convenient way to get a better overview while keeping all path information visible, is adding a newline before the last character. This way the cursor starts always in the same column, even if the path is long enough to wrap around, but your console window(s) should be high enough to not scroll out the previous lines too quickly. I removed the color codes for more clarity:

murphy@seasonsend:~
$ echo $PS1
\u@\h:\w\n\$
murphy@seasonsend:~
$ 
Source Link
Murphy
  • 2.7k
  • 1
  • 16
  • 22

Not a solution to shorten long paths, but a convenient way to get a better overview while keeping all path information visible, is adding a newline before the last character. This way the cursor is always in the same column, even if the path is long enough to wrap around, but your console window(s) should be high enough to not scroll out the previous lines too quickly. I removed the color codes for more clarity:

murphy@seasonsend:~
$ echo $PS1
\u@\h:\w\n\$
murphy@seasonsend:~
$