Re: Weird command line editing issues with Bash

2023-11-09 Thread Michael Grant
Note: Wrapping the tput output in \[ \] is recommended by the Bash man page. This helps Bash ignore non-printable characters so that it correctly calculates the size of the prompt. https://wiki.archlinux.org/title/Bash/Prompt_customization

mouse scrolling and scroll bars ideas (long)

2022-08-15 Thread Michael Grant
a built-in way to replay a screens scrollback buffer into the window. 4) virtual scrollbars around screens which are clickable and dragable. (1) may already be implemented unless it's tmux I'm recalling that had that feature. Even if without virtual scrollbars (i guess that could b

Re: prevent screen region clearing

2020-12-21 Thread Michael Grant
rminal screen) and when you exit vi, it switches back to the real screen. Try disabling that feature and see if that helps. Michael Grant signature.asc Description: PGP signature

Re: reading an environment variable from screen [SOLVED]

2020-12-17 Thread Michael Grant
On Thu, Dec 17, 2020 at 10:46:43AM -0500, Michael Grant wrote: > Slight change to my previous message: > > > if [ -n "$STY" ]; then > function fix_ssh_auth_sock() { > screen -S $STY -X colon "msgwait 0\r" > export SSH_AUTH_SOCK=

Re: reading an environment variable from screen [SOLVED]

2020-12-17 Thread Michael Grant
Slight change to my previous message: if [ -n "$STY" ]; then function fix_ssh_auth_sock() { screen -S $STY -X colon "msgwait 0\r" export SSH_AUTH_SOCK=`screen -S $STY -Q echo '$SSH_AUTH_SOCK\r'` screen -S $STY -X colon "msgwait 5\r" } export PROMPT_COMMAND=fix_

Re: reading an environment variable from screen [SOLVED]

2020-12-17 Thread Michael Grant
> In that case, this solution can be expanded a bit to do what you > want. The basic idea would be: > 1. On login, create a directory $HOME/.ssh/sockets/$TIME/ and put >a file setting the variables correctly in there (for example, >name the file $HOME/.ssh/sockets/$TIME/sshenv). In that cas

Re: reading an environment variable from screen

2020-12-16 Thread Michael Grant
On Wed, Dec 16, 2020 at 09:15:09AM -0800, Neal Fultz wrote: > There is not a getenv command to match setenv iirc. > > There's a -Q flag for query - z=$(screen -S $STY -Q echo '$SSH_AUTH_SOCK') Thanks, this is even closer. z is being set, but it outputs something to the screen which does go away

reading an environment variable from screen

2020-12-16 Thread Michael Grant
When I reattach to screen, the SSH_AUTH_SOCK is wrong. I often ssh in and run screen simultaneously on a laptop and desktop. So I can’t use the trick of symlinking something to /tmp/ssh-xx. Is there some way to interrogate screen to tell me what the contents of an environment variable

RE: real-time mouse selection in vi

2020-12-10 Thread Michael Grant
What is ‘bpr’? From: BX Snipa Sent: 10 December 2020 06:10 To: Michael Grant Subject: Re: real-time mouse selection in vi bpr From: screen-users on behalf of Michael Grant Sent: Wednesday, December 9, 2020 10:36 AM To: screen-users@gnu.org Subject: real-time mouse selection in vi   When I

real-time mouse selection in vi

2020-12-09 Thread Michael Grant
takes a second click to highlight the text and it does not highlight the text in real-time. The region highlights only after the second click. Any idea how to get the real-time selection working within screen? Michael Grant

RE: hardstatus and putty scrolling

2020-08-28 Thread Michael Grant
> Would you mind sharing your .screenrc? I feel like I could learn a lot from > it. Or if you have a dotfiles repo on github that would be fantastic too. Sure. I don’t have them in a public repo. If anything isn’t clear, please ask. Hope this is interesting/helpful to someone! I almost alway

RE: hardstatus and putty scrolling

2020-08-27 Thread Michael Grant
and copypaste probably would work across computers (within Screen). Sounds like a win-win-win if you ask me! Can this work? Comments? Michael Grant

RE: hardstatus and putty scrolling

2020-08-26 Thread Michael Grant
scrolled to. Anyone thought about this? Does this already exist? Michael Grant

hardstatus and putty scrolling

2020-08-26 Thread Michael Grant
I use Screen in PuTTY. I have a hard status line set. When I scroll up the PuTTY window, the hard status line scrolls off the bottom of the screen. I was wondering, is there some way to stop this such that the hard status line always stuck at the bottom of the window regardless of the position

Re: Help using eval in screenrc

2020-03-28 Thread Michael Grant
default! And, if anyone else has a better way of redrawing a screen's scrollback buffer than this, please post! I spent ages working this out. The only thing it does not redraw is the color, though I have 'paste font' enabled. Hope this helps! Michael Grant signature.asc Description: PGP signature

screen-users@gnu.org

2017-12-26 Thread Michael Grant
On Tue, Dec 26, 2017 at 08:55:15PM +, Ed wrote: > On Tue, Dec 26, 2017 at 08:40:45PM +, David Woodfall wrote: > > bind £ select 13 David, just out of curiousity, where are you trying to bind your key? In your .screenrc? or in .bashrc or somewhere odd? I have several key bindings like thi

Re: Binding GBP Pound Key

2017-12-26 Thread Michael Grant
y generates the unicode code 0xa3 which goes straight in as unicode and gets displayed as a £ when displayed. It's working fine even as I type this email in emacs inside mutt inside screen. Michael Grant signature.asc Description: PGP signature __

w, who, and finger and ipv6

2016-07-23 Thread Michael Grant
4 users, load average: 0.05, 0.07, 0.05 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT mgrant pts/12a00:S.1 Mon064days 0.02s 0.02s /bin/bash % finger Login NameTty Idle Login Time Office Office Phone mgrant Michael Grant pts

Re: Binding the "Ctrl + ;" key combination to "focus right" command

2016-04-10 Thread Michael Grant
There is a possible way to use ctrl-; in screen, you would first need to bind ctrl-; to a real ascii (perhaps even a multibyte unicode character would work). You would do this in your local window system. It's been a while since I did this but in X it was something like setxkbmap. In windows you

Putty and screen resizing

2015-11-04 Thread Michael Grant
their window putty window size. I understand iTerm resizes itself accordingly whereas Putty does not, or maybe I have some config option set or not set in putty? I can't find one that seems appropriate. Michael Grant ___ screen-users mailing list s

redraw screen (with scrollback history buffer)

2015-03-15 Thread Michael Grant
I defscrollback to 2000 and have a putty window with 2000 lines of scrollback. I would like a way to get screen to redraw the full 2000 lines of scrollback (with color and other highlighting!) on command. Currently I have a sort of kludge to do this writing a hardcopy file and then execing a scri

Re: screen height issue

2014-03-15 Thread Michael Grant
Mahood wrote: > On Sat, 15 Mar 2014, Michael Grant wrote: > > >> Yes I'm aware of this. But what would be cool is if the scrollbar could >> be somehow linked to the scrolling in copy mode. >> >> One thing I can imagine is just filling the of screen lines each

Re: screen height issue

2014-03-15 Thread Michael Grant
cript that does this bound to a key. It would be nice if those lines could be filled offscreen somehow. As in first the visible area was redrawn then the copy area so the user might not notice. On 15 Mar 2014 17:38, "Jim Mahood" wrote: > On Wed, 12 Mar 2014, Michael Grant wrote: &

screen height issue

2014-03-12 Thread Michael Grant
ross screens to scroll back whatever screen you were in? One possible way to do this might be to just dump the entire screen and it's history lines to fill up the putty buffer each time you switch screens. Michael Grant ___ screen-users mailing list

Re: emacs compatibility - changing a default binding?

2013-04-24 Thread Michael Grant
s pressed like AltGr-Esc. You can use a tool like http://www.kbdedit.com/ to create a new keyboard mapping (on windows--similar things exist on linux/mac) and add a key comination to emit the unicode character. If someone tries this, I'd be interested to know if that works! Michael Grant

Re: Please help me choose a good single-keystroke escape key

2011-03-23 Thread Michael Grant
I have my screen ^a key bound to ctrl-^. I use the F keys to move between windows. I could in theory have 12 windows, one on each F key. Michael Grant ___ screen-users mailing list screen-users@gnu.org http://lists.gnu.org/mailman/listinfo/screen

Re: Using pagers like 'less' within screen

2009-09-05 Thread Michael Grant
On Sat, Sep 5, 2009 at 17:48, Benjamin Andresen wrote: > Hey Hugo, > > Hugo Heden writes: > >> [snip] >> Is there a way to tell GNU-screen to use the "default terminal buffer" >> while still letting the programs invoked from within GNU screen use >> the "alternate terminal buffer"? > > altscreen o

Re: Dynamic Title

2009-05-31 Thread Michael Grant
chine named into the title bar of the window. You need the \[ and \] to tell bash not to count those characters as being displayed on the line, otherwise, it messes up the display when you start wrapping long input lines. ESC_ gets you into the status line and ESC\ gets out out. Is that wh

Re: nested hardstatus line

2009-04-22 Thread Michael Grant
This may not be helpful, but I wanted to point out that having the double status line down there is quite useful in letting you know that you are indeed in a screen session within another screen session. If you were to try to kill screen or use one of it's escape commands, you're going to have to

Re: Killing backticks when bouncing screen.

2009-01-23 Thread Michael Grant
/cat somefile. Note: The ^[ is an escape character, not ^ followed by [ (there are 2 escapes in that line above), but the [ without the ^ before it is a single [. I realize that's a bit confusing to look at. With this you have no process to worry about, but the down side is that it doesn't

Re: screen on linux vs freebsd

2009-01-04 Thread Michael Grant
On Sun, Jan 4, 2009 at 12:16 PM, Michael Grant wrote: > I have both a linux box and a freebsd box. I have just started using > screen on the linux box. There seems to be some very definite > differences in behavior between the two. > > On the linux box, using putty, screen does

screen on linux vs freebsd

2009-01-04 Thread Michael Grant
h screens, but you see it, and you loose any color. I don't know any way to tie the scroll bar to anything because as far as I know, there's no escape codes associated with the scroll bar which is a shame. But aside from this idea, is the

Re: Reattaching to a detached screen

2009-01-01 Thread Michael Grant
Here is what I use in my .bash_login: if screen -wipe 2>&1 | egrep -v "No Sockets found" >/dev/null; then echo -n "Reattach to detached tree? (y/n) [space=y] " read -n1 a; if [[ ("$a" = "y") || ("$a" = "") ]]; then exec screen -xRR fi echo "" else echo "type 'screen' to start scree

Re: screen -X

2008-12-04 Thread Michael Grant
lowing this thread closely. I use dsh for what you describe, but it's command line. It doesn't work real well to edit things in full screen mode. Michael Grant ___ screen-users mailing list screen-users@gnu.org http://lists.gnu.org/mailman/listinfo/screen-users

Re: hangs

2008-02-10 Thread Michael Grant
not create a > core. But I can open up another Putty session and run a kill -6 > to generate a core. > > Let me know if this is a good approach. > > > > > > > On Feb 10, 2008 9:20 AM, Michael Grant <[EMAIL PROTECTED]> wrote: > > > No, nobody

Re: How to make F1/F2/F3/F4 usable in screen emacs?

2008-01-22 Thread Michael Grant
/F4 keys or other > applications? > > > "Michael Grant" writes: > > > I have the function keys working well in emacs. Some function keys > > are bound to emacs functions and some are bound to screen functions > > (like to switch windows). > > > > I usua

Re: How to make F1/F2/F3/F4 usable in screen emacs?

2008-01-21 Thread Michael Grant
this in my .screenrc: # f9,f10,f11,f12 selects window 3,0,1,2 bindkey -k k9 select 3 bindkey -k k; select 0 bindkey -k F1 select 1 bindkey -k F2 select 2 # same thing but for Sun keyboard bindkey "\033[232z" select 3 bindkey "\033[233z" select 0 bindkey "\033[192z" select

hangs

2007-11-12 Thread Michael Grant
work. Quitting screen such that I can reconnect later does not restart things. The seems to be associated with the pty. The screen unblocks all the time after about 10 minutes or so. Has anyone else noticed this? Michael Grant ___ screen-users mailing li

Re: sending key strokes with screen

2007-07-10 Thread Michael Grant
Someone on this list, I cannot remember who, recommended using a register and then processing the register. Here is a command I wrote which redisplays a screen and it's save buffer so when you log back in and reattach, you can get then scroll up: register A "\001:hardcopy -h /tmp/mgrant.screendu

Re: repainting the screen buffer

2007-03-13 Thread Michael Grant
On 3/11/07, Michael Grant <[EMAIL PROTECTED]> wrote: In most modern terminal programs like Putty there is a scrollbar and you can scroll the window up to see previous lines in a local buffer. Screen also has a scrollback history buffer of saved lines. Is there some to way to bind a key

repainting the screen buffer

2007-03-11 Thread Michael Grant
that it "repaints" not only the visible screen but also the lines above in my terminal's scrollback buffer? Michael Grant ___ screen-users mailing list screen-users@gnu.org http://lists.gnu.org/mailman/listinfo/screen-users

Re: New screen features available

2007-02-07 Thread Michael Grant
etimes the scrollbar (in the ssh ap) gets turned off by some escape sequence. Send this escape sequence and put in the ascii one. Michael Grant ___ screen-users mailing list screen-users@gnu.org http://lists.gnu.org/mailman/listinfo/screen-users

Re: Remapping ^a

2006-10-22 Thread Michael Grant
e then in my .screenrc file I added: bindkey "\033[15~" command and when I press f5, that is my new screen escape key. Michael Grant On 10/22/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Hi, I have a spanish keyboard and I use º instead of ^a (º is below the esc key and to

putty screen size issue

2006-08-20 Thread Michael Grant
is or something similar has been discussed before but trying the -A option didn't solve this for me. Michael Grant ___ screen-users mailing list screen-users@gnu.org http://lists.gnu.org/mailman/listinfo/screen-users