sdb icon indicating copy to clipboard operation
sdb copied to clipboard

add a way to clear the screen

Open prakashsurya opened this issue 6 years ago • 3 comments

When using the bash shell interactively, I often use clear to clear my terminal screen of any prior output. Out of habit, I often attempt to do this when in an SDB session as well, and result in the error:

> clear
sdb: cannot recognize command: clear

It would be great to have a way to clear the screen when in an SDB session, much like what is possible via a bash session.

prakashsurya avatar Nov 15 '19 21:11 prakashsurya

I never explicitly type clear in bash - the shortcut for it is Ctrl+l so I use that. It also works in sdb because we are using the same library used by bash and the Python REP(readline).

I'd be open in accepting a command that does the above btw, I just wanted to point out that you can already do this if you want.

sdimitro avatar Nov 18 '19 17:11 sdimitro

Interesting! So, in my bash settings, I use set -o vi, so ctrl-l doesn't work for me. I also use tmux heavily, and have ctrl-l further configured to switch panes; so even when I use set -o emacs, if I'm in a tmux session, ctrl-l still doesn't work to clear the screen, since tmux captures that first and switches the pane instead.

When I'm not in a tmux session though, ctrl-l does work in sdb, which I wasn't aware of until now.

prakashsurya avatar Nov 18 '19 17:11 prakashsurya

FYI I created this issue too that is somewhat relevant -> https://github.com/delphix/sdb/issues/97

sdimitro avatar Nov 21 '19 17:11 sdimitro