Note that $WINDOW is the number when the process is created, vs `screen -Q`
is at runtime - if/when you renumber windows they will no longer match.
Maybe that's a bug you can live with, though.
On Thu, Mar 14, 2024 at 12:18 AM aotto wrote:
> Hi, thanks for this hint, I update your code
>
> # Scr
Hi, thanks for this hint, I update your code
# Screen only
if [ -n "$STY" ] ; then
source ~/.screendb
SNUM=d$WINDOW
if [ -n "${!SNUM}" ] ; then
cd "${!SNUM}"
PROMPT_COMMAND="$PROMPT_COMMAND; sed -i 's!$SNUM=.*!$SNUM='\$(pwd)'!'
~/.screendb"
fi
fi
the "WINDOW" v