[PLUG] Saving terminal commands

Michael M. Moore michael at writemoore.net
Thu Feb 5 07:56:37 UTC 2009


On Wed, Feb 4, 2009 at 7:56 PM, John Jason Jordan <johnxj at comcast.net> wrote:
>
> Keeping the commands in a text file is what I do now. I keep the
> cdparanoia and lame commands in an OOo document, but most of the rest
> are in Gedit. Still, I have to open Gedit, scroll down, select the
> command, switch to the terminal, then click on Paste because it can't
> take Ctrl-v. It would be so much easier if I could recall the command
> from within the terminal.

The beauty of text files is that you *don't* have to open them to
access their contents.

It works like this:

mcubed at debdesk:$ cat cheat_wget.txt
wget options
-S     #use to see server headers
-c     #use to continue a partially downloaded file
-a [name of log]     #use to generate a logfile
--limit-rate=??k     #use to limit download rate
--http-user=XXXXX --http-password=XXXXX     #use for Easynew login
mcubed at debdesk:$ wget

The wget options I use 95% of the time are all there -- no opening man
pages and scrolling through them, no opening text editors and
scrolling and selecting and right-clicking and selecting "copy" and
switching back to the terminal and right clicking again and selecting
"paste".

I just highlight, with the mouse, or retype the particular option(s) I
need for the file I'm about to download, and paste into the next line
(after $ wget) using the middle mouse button.  When it's a one-letter
option, it's faster just to type the letter, rather than highlighting
and pasting.  My problem is that I have a hard time remembering what
the letter is, and whether it needs one dash ("-") or two dashes
("--"), and whether it needs to be capitalized or lower-case.  So now
it's right there, as a readily accessible reference.

You don't need Ctrl-v and Ctrl-c in the terminal and you never need to
right-click and select from a menu of options.  Just highlight a some
text anywhere (a website, an email, a word-processing document, a text
file, or a pre-existing line in the terminal), move to the position
you want to paste the text into, and push the middle mouse button.
That pastes whatever text is currently highlighted, wherever it might
be highlighted.

Here, highlight this:

PASTING IS FUN

Switch over to a terminal and push your middle mouse button.

See?  Much faster than opening file/highlighting
text/right-clicking/selecting "copy"/switching to
terminal/right-clicking again/selecting "paste".

Michael M.

-- 
"Rightful liberty is unobstructed action according to our will within
limits drawn around us by the equal rights of others. I do not add
'within the limits of the law' because law is often but the tyrant's
will, and always so when it violates the rights of the individual."
--Thomas Jefferson



More information about the PLUG mailing list