[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

query current window title to stdout?

From: Michael Parson
Subject: query current window title to stdout?
Date: Fri, 15 Aug 2008 11:42:35 -0500

I've got a user that wants to be able to, with a single command, rename the title for the current window when he edits a file to the name of the file he is editing.

What I've come up with is a bash function:

svim () {
        echo -ne "\ekediting $1 \e\\"
        /usr/local/bin/vim $1
        echo -ne "\ekbash\e\\"

What I would like to be able to do, is query the title of the window before we rename it, so we can set it back to what it was after the editor quits. something like:

oldname=`screen -X windowname`

So I could change that last echo to be more like

echo -ne "\ek$oldname\e\\"

However, it seems that just about every screen command only spit output to the status bar, hardline, or a new screen, except 'screen -l'.

Can this be done? or is the solution I've come up with going to be about as good as it gets?

Michael Parson

reply via email to

[Prev in Thread] Current Thread [Next in Thread]