[Cialug] Bash or Terminal Output
Todd Walton
tdwalton at gmail.com
Fri Dec 28 15:12:40 UTC 2018
On Mon, Jul 30, 2018 at 9:54 AM Todd Walton <tdwalton at gmail.com> wrote:
>
> On Thu, Jul 26, 2018 at 11:43 AM, Kyle H <khamil8686 at gmail.com> wrote:
>>
>> What do you want to change? Curious, maybe we all can help.
>
> With respect to the terminal, I'd like some way to signal to it that I want to lock scrolling, so if I then cat a file the contents go off the screen bottom and I can begin scrolling down at my leisure, instead of catting, then scrolling back up to the beginning. When there's a *lot* that dumps out, it can be a pain to find the last prompt. This is a simple example, so yes 'less' would work. I would like 'lock screen, scroll at leisure' to work as well. And while we're on it, some key combo or click thing to jump up and down from prompt to prompt. That'd be nice.
>
> With respect to Bash, the idea this thread began with, first of all. Run a command, it outputs, then some symbol or parameter that stood in for the contents of the output of the last command. I want to, say, 'ls', and then 'grep blah ${variable} | another_command'. After the fact. Or run a command, get output, return to prompt, and then use the keyboard to jump between fields of the previous output, and when I hit Enter it enters whatever field I was on onto the current command line. Something like 'yank'* but without having to specify it beforehand. *https://github.com/mptre/yank
>
> Also, HISTIGNORE should have a way of respecting a list of commands. If I want to HISTIGNORE all uses of 'ls', and I run "ls; rm ./file", it definitely should not ignore that. Either don't ignore it at all, or ignore just the ls part, or something.
>
> And I'd like history to go to syslog, be immutable, etc. That's not impossible, of course. But it's certainly not the default. One would just have to do the setup. It'd be nice to record the command line that was entered, the directory it was run in, the user, the timestamp, the actual command line run after alias expansion, parameter expansion, etc and so on.
Aha! I just found something kind of like this, called:
SCM Breeze:
https://github.com/scmbreeze/scm_breeze
The README is kind of confusing, but it's implementing something kind
of like what I was describing above, with running a command, seeing
the output, and *then* being able pull in parts of that output for
further processing, without having to know ahead of time that you're
going to do that.
Seems interesting. I haven't tried it yet.
--
Todd
More information about the Cialug
mailing list