Better HN
topnewbestaskshowjobs
Log inSign up

lowry

329 karma · joined Oct 20, 2013 (13y ago) · 223 submissions

Submissions

comment 7y ago · link · parent

Truncate the $PWD to ¼ of the terminal width and put the result into the command prompt:

    # truncate the $PWD
    function cut_pwd
    {
      newPWD="${PWD/#$HOME/\~}"
      local pwdmaxlen=$((${COLUMNS:-80}/4))
      if [ ${#newPWD} -gt $pwdmaxlen ]
      then
         newPWD=".+${newPWD: -$pwdmaxlen}"
      fi
    }

    PROMPT_COMMAND=cut_pwd
    PS1="\h:\${newPWD} \\$ "

comment 7y ago · link · parent

So why not punish Israel as well?

comment 7y ago · link · parent

Says the username judah :-)

comment 7y ago · link · parent

Still free speech, though.

comment 8y ago · link · parent

Aha! This is the Spotify model!
12345
8