|
From: | Marcin Stolarek |
Subject: | Unsubscribe |
Date: | Wed, 20 Mar 2024 21:20:09 +0100 |
Send screen-users mailing list submissions to
screen-users@gnu.org
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.gnu.org/mailman/listinfo/screen-users
or, via email, send a message with subject or body 'help' to
screen-users-request@gnu.org
You can reach the person managing the list at
screen-users-owner@gnu.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of screen-users digest..."
Today's Topics:
1. Re: screen session remember (Neal Fultz)
----------------------------------------------------------------------
Message: 1
Date: Thu, 14 Mar 2024 08:50:30 -0700
From: Neal Fultz <nfultz@gmail.com>
To: aotto <aotto1968@t-online.de>
Cc: Anton Sharonov <anton.sharonov@gmail.com>, screen-users@gnu.org
Subject: Re: screen session remember
Message-ID:
<CAL9B2vfuosBuVENS3oMvf8nbGVT2UuGwE6HMUaYPKv1Y2R0Qcg@mail.gmail.com" target="_blank" rel="noreferrer">CAL9B2vfuosBuVENS3oMvf8nbGVT2UuGwE6HMUaYPKv1Y2R0Qcg@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
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 <aotto1968@t-online.de> wrote:
> 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" variable is already do the `screen -Q number` thing and I use
> the
> external ".screendb" for storage.
>
>
> d0=/home/myusr/prj/tool
> d1=/home/myusr
> d2=/tmp
> d3=.
> d4=.
> d5=.
> d5=.
> d7=.
> d8=.
> d9=.
>
>
>
> On 13.03.24 23:26, Neal Fultz wrote:
> > # Screen only
> > if [ -n "$STY" ] ; then
> >
> > d1=/home/nfultz/projects
> >
> > SNUM=`screen -Q number`
> > SNUM=d${SNUM%% *}
> >
> > if [ -n "${!SNUM}" ] ; then
> > cd "${!SNUM}"
> > PROMPT_COMMAND="$PROMPT_COMMAND; sed -i
> 's!$SNUM=.*!$SNUM='\$(pwd)'!' ~/.bashrc"
> > fi
> >
> > fi
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnu.org/archive/html/screen-users/attachments/20240314/0f1a9614/attachment.htm>
------------------------------
Subject: Digest Footer
_______________________________________________
screen-users mailing list
screen-users@gnu.org
https://lists.gnu.org/mailman/listinfo/screen-users
------------------------------
End of screen-users Digest, Vol 1793, Issue 2
*********************************************
[Prev in Thread] | Current Thread | [Next in Thread] |