nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] [PATCH] Improve execute command prompt


From: Benno Schulenberg
Subject: Re: [Nano-devel] [PATCH] Improve execute command prompt
Date: Sun, 10 Sep 2017 20:21:13 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1


Op  6-09-2017 om 23:14 schreef David Ramsey:
My specific uses depend on the exact things I'm doing, but the most
common general cases for me are:

1. "ls" with specific command line options (such as --time-style=iso, so
that all files are shown with full dates instead of just non-recent
ones, so that in turn the file listing remains consistent no matter when
I make it).  Running it inside nano is much easier than opening up
another terminal or suspending nano and running "ls" separately,

Does your terminal emulator not support tabs?  (Shift+Ctrl+T on Xfce.)

And why put nano to sleep?  I normally just close nano, do what I need
to do, and then reopen the same file.  The cursor will be at the same
spot (because of position history) and all the search strings are still
there too.  Only the cutbuffer will be gone, and the undo stack, but
apparently I don't care about those.  Do you regularly have multiple
files open so you cannot just close nano?

and
then having to copy and paste a listing that may take up much more than
one screenful.

I would do 'ls --options >xxx' and then in nano ^R xxx <Enter>.  I simply
wouldn't think of using ^R ^X, because bash has my whole history of commands
and has command completion and filename completion and...

When I have to run the same command again (or a variant
with only slight changes to the options), having to type it all again
with all the options takes up time unnecessarily.

Yes, a session history of commands is good, so you can do <Up> and edit
the previous one or earlier ones.  But across sessions...

2. "echo" piped through "bc", for similar reasons.  If I need to do some
arithmetic that I can't do easily in my head, running it inside nano is
much easier than the aforementioned alternatives, and, if I have to run
several formulas with only minor variations, having the formulas saved
in the history where I can edit them to make new formulas would, again,
save me the time I would otherwise spend retyping them.

So, basically you use nano's ^R ^X as a mini shell?  Where you can run
different commands in separate buffers so you have separate scrollbacks?

Benno



reply via email to

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