l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
December 2: Social gathering
Next Installfest:
TBD
Latest News:
Nov. 18: Club officer elections
Page last updated:
2003 Jun 13 10:14

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] readline questions (in bash)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] readline questions (in bash)



--eNMatiwYGLtwo1cJ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Jun 13, 2003 at 08:28:07AM -0500, Jay Strauss wrote:
> 1. I know ctr-a, ctr-e move me from front to back, how do I make my home =
and
> end keys do that?

  home/end should work as you expect.  If they don't there is a local
config problem.

> 2. Isn't cut and paste (kill/yank) supposed to keep a list of commands, t=
hat
> I can scroll through?  When I use it, it only saves the last command I
> killed

from "man readline"
=3D=3D=3D
       yank (C-y)
              Yank the top of the kill ring into  the  buffer  at
              point.
       yank-pop (M-y)
              Rotate  the  kill ring, and yank the new top.  Only
              works following yank or yank-pop.
=3D=3D=3D

  So after typing ^Y, type alt-y to rotate through kill history.

> 3. If I up/down arrow I scroll thru my commands.  But when I try to use C=
-r
> or C-s I don't see all the commands in my history.  Is there another way =
to
> search thru and execute a command in the history (ideally it would
> autocomplete and scroll (like vim does when you want to read in a file))

  The ^R and ^S options start their search from the location in the
history you are at, and go in the correct direction.  Like most other
utilities (less, vi, etc) they stop when they hit the end of your history.
  So if you are going to do a history search just type ^R.  If you have
scrolled around in the history you can use the following M-> to get to=20
the end before ^R
=3D=3D=3D
       beginning-of-history (M-<)
              Move to the first line in the history.
       end-of-history (M->)
              Move  to  the  end  of the input history, i.e., the
              line currently being entered.
=3D=3D=3D

  If you have typed in a few characters into the ^R search and do not
find the entry you want, type ^R again to move to the previous entries.

  Be warned that ^S does not work for searching because it is bound to the
tty "stop" function by default.  see "stty -a" for a list of bindings.
If you run:
  stty stop undef
first you can use ^S to move to the next (instead of previous) incremental
search item.  You also could use M-<, then ^S to search down from the oldest
history.  Unless you do the stty, then readline will not get the character
presses and it will appear that nothing is happening.

    TTFN,
      Mike

ps:
  I suggest reading the readline man page.

--=20
GPG key: http://simons-clan.com/~msimons/gpg/msimons.asc
Fingerprint: 524D A726 77CB 62C9 4D56  8109 E10C 249F B7FA ACBE

--eNMatiwYGLtwo1cJ
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE+6gCW4Qwkn7f6rL4RAhiYAJ9IbzCcxmwLIbCvyeeSxHPJNuOZQwCeJjYi
t6zQOYCtr9tC1L15yvieTVU=
=aFSE
-----END PGP SIGNATURE-----

--eNMatiwYGLtwo1cJ--
_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech








LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Appahost Applications
For a significant contribution towards our projector, and a generous donation to allow us to continue meeting at the Davis Library.