This is a autopost bolg frinds we are trying to all latest sports,news,all new update provide for you
Thursday, August 3, 2023
Show HN: Try my new Bash prompt https://ift.tt/q16gBiQ
Show HN: Try my new Bash prompt PS1='\$ ' # short and sweet prompt old_cmdno=${old_cmdno-0} old_lines=${old_lines-0} old_cols=${old_cols-0} prepare_terminal() { stty rows $((LINES - 1)) printf "\n\033[1A" old_lines=$LINES old_cols=$COLUMNS } update_status_line() { local exit=$? local getcmdno='\#' local cmdno=${getcmdno@P} local esc=$(printf "\033") local pwd=$PWD local dots= [ $LINES -eq $old_lines -a $COLUMNS -eq $old_cols ] || prepare_terminal local status_esc="$esc[7m$esc[m" while true; do [ "${pwd#/*/}" == "$pwd" ] && break local status="$esc[7m$(date +%m-%d/%H:%M)$esc[m $HOSTNAME $dots$pwd" local status_len=$((${#status} - ${#status_esc})) [ $status_len -le $COLUMNS ] && break pwd=${pwd#/} pwd=/${pwd#*/} dots='...' done status_len=$((${#status} - ${#status_esc})) [ $status_len -gt $COLUMNS ] && status= printf "${esc}7$esc[%s;1H$esc[K%s$esc[1;%sr${esc}8" $((LINES + 1)) "$status" $LINES if [ $exit -ne 0 -a $cmdno -ne $old_cmdno ] ; then printf "!%s!\n" $exit fi old_cmdno=$cmdno } PROMPT_COMMAND='update_status_line' August 4, 2023 at 08:50AM
Subscribe to:
Post Comments (Atom)
Show HN: Tablr – Supabase with AI Features https://ift.tt/ltABMro
Show HN: Tablr – Supabase with AI Features https://www.tablr.dev/ June 30, 2025 at 04:35AM
-
Show HN: Locksmith – detect locks taken by Postgres migrations https://ift.tt/0cBueJt February 10, 2025 at 02:26AM
-
Show HN: I built a FOSS tool to run your Steam games in the Cloud I wanted to play my Steam games but my aging PC couldn’t keep up, so I bui...
-
Show HN: TNX API – Natural Language Interactions with Your Database Hey HN! I built TNX API to make working with databases as simple as aski...
No comments:
Post a Comment