Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Introducing zsh-hints



Hi Ray, 

On Sun, 30 Mar 2014 07:17:20 -0700
Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
>
> > https://github.com/joepvd/zsh-hints
> An interesting looking project. But what is 'the buffer'? Does this
> work at CLI?

The purpose is to get a bunch of information when in the middle of
composing a command (AKA editing the buffer). Here, pressing
<CTRL-X><f> displays parameter expansion flags. 

% for i in *; do print ${(on<CTRL-X><f>
@         ▶ array elements
c         ▶ count elements of array/string
k,v       ▶ returns keys, values of associative array
u         ▶ unique, deduplicate entries
A(A)      ▶ create (associative) array, useful with
            ${(A)...=...}
s:string: ▶ field splitting at string
f         ▶ split at newlines (ps:\\n:)
z         ▶ (Z:opt:) split result into shell words
0         ▶ split with 0-bytes: ps:\\0:
j:string: ▶ join words of array with string as separator
F         ▶ join words of array with newlines (pj:\\n:)
w         ▶ count words, use s to define word delimiter
W         ▶ count words, double delimiters count doubly
i         ▶ sort case insensitive. Combine with n, O
n         ▶ sort numerically
o         ▶ sort in ascending order
O         ▶ reverse sort order
a         ▶ sort in array index order (with O reversed)
U         ▶ convert to uppercase
L         ▶ convert to lowercase
V         ▶ make special characters visible
   ...14 hints omitted.

Note that this is on a rather small terminal, some hints needed to be
omitted, and there is a line wrapping at A(A). It is really easy to
change the hints files, so you can just make a list of things you are
currently learning. 

I hope it is clearer now. 


Kind regards, 


	Joep
 
 





Messages sorted by: Reverse Date, Date, Thread, Author