Re: Caption to show `pwd` instead of shell?

Kevin Van Workum <[email protected]>
Newsgroups gmane.comp.gnu.screen.user
Message-ID <CAHom8yv9oN_69ajqSVMQMTdUNF5JtaAsiP8w7_Dfw9JkLaYp_w@mail.gmail.com>
On Wed, Aug 7, 2013 at 5:49 PM, David Woodfall <[email protected]> wrote:

> I'm using this caption:
>
> caption string "%{= 9w}%-w%{+b w}%n-%f %t%{-}%+w%{+b w}"
>
> What I'd like to do is change each listed window to show the pwd
> instead of shell. I'm using zsh.
>
> I can't see any way of doing this except to update it every time a
> command is run.
>
> Is there a way to do this at all?
>
> D.
>
>
>
I have this as my caption:

 caption always "%{kc}%n: %t%? @%u%?%? %?%=%D-%M-%d %c"

and this as my precmd in .zshrc:

precmd() {
    if [ "$TERM" = "screen" ]; then
echo -ne "\033k${USER}@${HOSTNAME}:${PWD/#$HOME/~}\033\\";
    fi
}


>
> ______________________________**_________________
> screen-users mailing list
> screen-users-mXXj517/[email protected]
> https://lists.gnu.org/mailman/**listinfo/screen-users<https://lists.gnu.org/mailman/listinfo/screen-users>
>

--

_______________________________________________
screen-users mailing list
screen-users-mXXj517/[email protected]
https://lists.gnu.org/mailman/listinfo/screen-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.