zsh-users
 help / color / mirror / code / Atom feed
* autoload
@ 2014-12-23 15:51 Ray Andrews
  2014-12-23 17:36 ` autoload Bart Schaefer
  0 siblings, 1 reply; 46+ messages in thread
From: Ray Andrews @ 2014-12-23 15:51 UTC (permalink / raw)
  To: Zsh Users

I'm just reading that I can use autoload with my own functions (thought 
it was just for internal stuff ...).  Any words of wisdom on that?  Can 
we determine how much memory functions use when loaded, such that a 
practical determination might be made as to how much 'real' difference 
it might make to free memory vs. any speed considerations?  What do guys 
do in the real world?

. ./ray


^ permalink raw reply	[flat|nested] 46+ messages in thread
* Announce of Zsh Navigation Tools
@ 2015-09-08 12:32 Sebastian Gniazdowski
  2015-09-12 17:50 ` Ray Andrews
  0 siblings, 1 reply; 46+ messages in thread
From: Sebastian Gniazdowski @ 2015-09-08 12:32 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 1883 bytes --]

Hello,
I would like to announce Zsh Navigation Tools, a set of utilities based on
the tool's main component – n-list, a zcurses based selection list
supporting ANSI coloring and incremental search. The utilities are:

- n-aliases - browses aliases, relegates editing to vared
- n-cd - browses dirstack and bookmarked directories, allows to enter
selected directory
- n-env - browses environment, relegates editing to vared
- n-functions - browses functions, relegates editing to zed or vared
- n-history - browses history, allows to edit and run commands from it
- n-kill - browses processes list, allows to send signal to selected process
- n-options - browses options, allows to toggle their state
- n-panelize - loads output of given command into the list for browsing
- n-preview - a demonstration of running two lists at the same time and of
ANSI colors - syntax highlighted source browser

On GitHub page there is a link to video:

https://github.com/psprint/zsh-navigation-tools

The main idea behind the tools is that it is good to have navigation as
option side to completion.

Features not yet mentioned:
- initial grepping of what is browsed with "$1" given to utility
- making lists with non-selectable elements (to e.g. include headers in the
list)
- counting of how much elements there are (even when there are headers)
- jumping over predefined positions in the list with '[', ']' keys (used to
jump to bookmarks in 'n-cd' and through signals in 'n-kill')
- rich keys close to those of 'less' (like g, G, ctrl-u, ctrl-d, ctrl-p,
ctrl-n, /, j, k, home, end, etc.)

The code uses curses and regex modules. It is clean thanks to Zsh's rich
available math syntax when variable is declared as integer. N-preview will
show colored syntax if there is program "highlight" installed on the system.

Best regards,
Sebastian Gniazdowski

^ permalink raw reply	[flat|nested] 46+ messages in thread
* autoload
@ 2015-09-17 15:54 Ray Andrews
  2015-09-17 17:34 ` autoload Bart Schaefer
  0 siblings, 1 reply; 46+ messages in thread
From: Ray Andrews @ 2015-09-17 15:54 UTC (permalink / raw)
  To: Zsh Users

Bart:

I did this, which should be verbatim as you posted:


     # Assume starting here with the default $fpath
     zsh_default_functions=~/.zsh-default-functions.zwc
     if ! zcompile -t $zsh_default_functions >&/dev/null
     then
       # File is missing or out of date.  Rebuild it.
       # Removes the file if any function cannot be compiled.
       zcompile $zsh_default_functions $^fpath/*(N.:A)
     fi
     if [[ -f $zsh_default_functions ]]
     then
       fpath=( $zsh_default_functions )
       autoload -w $zsh_default_functions
     fi

... and I get:

     /aWorking/Zsh/Boot/ztest:5: parse error near `)'
     /aWorking/Zsh/Boot/ztest:zcompile:10: can't read file: /usr/share 
                 /zsh/functions/Completion /Base.zwc

('ztest' being sourced by .zshrc and where I do experiments.)

'Base.zwc' exists:

     $ ls -l Base.zwc
     -rw-r--r-- 1 root root 269472 Aug 31 16:26 Base.zwc

... and  "zcompile -t Base.zwc" doesn't report anything amiss.

The  " parse error near `)' " msg. is puzzling since it always reports 
line 5 regardless of anything added above it ,eg: "echo "this echo is 
only here to add a line of code"".

For example if I modify your code like this:

     line5
         # Assume starting here with the default $fpath
zsh_default_functions=~/.zsh-default-functions.zwc
     line9

... I get this:

     /aWorking/Zsh/Boot/ztest:5: command not found: line5
     /aWorking/Zsh/Boot/ztest:9: command not found: line9
     /aWorking/Zsh/Boot/ztest:5: parse error near `)'
     /aWorking/Zsh/Boot/ztest:zcompile:14: can't read file: /usr/share 
/zsh/functions/Completion/Base.zwc

... so the deliberate errors are as expected, yet she insists on finding 
an `)' error on line 5 as well, and that after having reached line 9, so 
I have no idea how to understand that.




^ permalink raw reply	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2015-09-23 15:06 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-23 15:51 autoload Ray Andrews
2014-12-23 17:36 ` autoload Bart Schaefer
2014-12-23 18:19   ` autoload Ray Andrews
2015-09-08 12:32 Announce of Zsh Navigation Tools Sebastian Gniazdowski
2015-09-12 17:50 ` Ray Andrews
2015-09-12 19:41   ` ZyX
2015-09-12 21:03     ` Ray Andrews
2015-09-12 22:10       ` Bart Schaefer
2015-09-12 23:03         ` Ray Andrews
2015-09-12 23:43           ` Bart Schaefer
2015-09-14  2:14             ` autoload Ray Andrews
2015-09-14  2:38               ` autoload Bart Schaefer
2015-09-14  3:34                 ` autoload Ray Andrews
2015-09-14 20:21                   ` autoload Bart Schaefer
2015-09-15  2:48                     ` autoload Ray Andrews
2015-09-15  3:48                       ` autoload Bart Schaefer
2015-09-15 16:18                         ` autoload Ray Andrews
2015-09-16  4:09                         ` autoload Ray Andrews
2015-09-17 15:54 autoload Ray Andrews
2015-09-17 17:34 ` autoload Bart Schaefer
2015-09-17 19:22   ` autoload Ray Andrews
2015-09-17 20:40     ` autoload Bart Schaefer
2015-09-17 23:06       ` autoload Ray Andrews
2015-09-17 23:20         ` autoload Bart Schaefer
2015-09-18  1:20           ` autoload Ray Andrews
2015-09-18  4:04             ` autoload Bart Schaefer
2015-09-18  5:00               ` autoload Ray Andrews
2015-09-18  5:52                 ` autoload Bart Schaefer
2015-09-18 15:49                   ` autoload Ray Andrews
2015-09-18 16:52                     ` autoload Bart Schaefer
2015-09-18 18:29                       ` autoload Ray Andrews
2015-09-18 19:02                         ` autoload Bart Schaefer
2015-09-18 22:57                           ` autoload Ray Andrews
2015-09-19  0:14   ` autoload Bart Schaefer
2015-09-19 15:04     ` autoload Ray Andrews
2015-09-19 16:29       ` autoload Bart Schaefer
2015-09-19 18:13         ` autoload Ray Andrews
2015-09-19 21:22           ` autoload Bart Schaefer
2015-09-19 22:12             ` autoload Ray Andrews
2015-09-20  5:53               ` autoload Bart Schaefer
2015-09-20 15:37                 ` autoload Ray Andrews
2015-09-20 15:59                   ` autoload Bart Schaefer
2015-09-20  0:58             ` autoload Ray Andrews
2015-09-20  5:41               ` autoload Bart Schaefer
2015-09-20 23:21                 ` autoload Ray Andrews
2015-09-21  4:18                   ` autoload Bart Schaefer
2015-09-21 17:03                     ` autoload Ray Andrews
2015-09-21 18:17                       ` autoload Bart Schaefer
2015-09-21 20:09                         ` autoload Ray Andrews
2015-09-22  3:19                           ` autoload Bart Schaefer
2015-09-22 17:33                             ` autoload Ray Andrews
2015-09-23  4:39                               ` autoload Bart Schaefer
2015-09-23 15:06                                 ` autoload Ray Andrews

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).