[go: nahoru, domu]

Skip to content

Commit

Permalink
Added current collection to recover from SVN-repo break.
Browse files Browse the repository at this point in the history
  • Loading branch information
whiteinge committed May 16, 2009
0 parents commit f15c976
Show file tree
Hide file tree
Showing 118 changed files with 14,059 additions and 0 deletions.
282 changes: 282 additions & 0 deletions oalug_2007-08-25_zsh/presentation.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,282 @@
===========
Why Z shell
===========

:Author: Seth House

---------------
A Short History
---------------

* Written in 1990 by Paul Falstad at Princeton University
* Named for the login of a teaching assistant, Zhong Shao
* Implements many of the features of bash, ksh, and csh

------
Basics
------

* ``~/.zprofile``
* ``~/.zshrc``
* ``~/.zlogin``
* ``~/.zlogout``

*Everything* is configurable.

``man zsh`` vs. ``man zshall``

-------------------
The Emacs of Shells
-------------------

* Tetris
* IRC client
* Web server
* Check multiple mailboxes

-------------------
Compatibility Modes
-------------------

Tries to emulate *sh* or *ksh* when invoked as ``sh`` or ``ksh``, respectively.

-----------------
Themeable Prompts
-----------------

Some built-in themes, others can be created.

Preview all built-in themes::

prompt -p

-------------
Shell Options
-------------

http://zsh.sunsite.dk/Doc/Release/zsh_15.html

Some of my favorites

* ``auto_cd``
* ``extendedglob``
* ``no_clobber``
* ``rm_star_wait``
* ``share_history``

--------------
Spell Checking
--------------

``zsh: correct 'aptg-et' to 'apt-get' [nyae]?``

---------------
Zsh Line Editor
---------------

* **Zsh does not use readline!**
* Excellent Multiline Editing

----------------
Pattern Matching
----------------

Recursive Search
``**/``
Numeric Ranges
``ls file<1-5>``, ``ls file<50->``
Negate Matches
``ls ^*.o``
Grouping
``ls (foo|bar)``

---------------
Globbing Basics
---------------

Regular Files
``ls *(.)``
Irregular Files
``ls *(^.)``
Directories
``ls *(/)``
Executable Files (non-directories)
``ls *(*)``
Symbolic Links
``ls *(@)``
Follows Symbolic Links
``ls *(-)``

-----------------------
Globbing by Permissions
-----------------------

Current user
``(r)``, ``(w)``, ``(x)``
All users
``(R)``, ``(W)``, ``(X)``
Owned by you
``(U)``
Setuid
``(s)``

--------

All setuid files on your system::

ls /**/*(s)

---------------------
Globbing Combinations
---------------------

Readable, not writable for you::

ls *(r^w)

Executable files (after following symbolic links)::

ls *(-*)

Broken Symbolic Links::

rm *(-@)

---------------------
Globbing by File Size
---------------------

File Size qualifier: ``(L)`` (length)

Default unit is bytes, modifiers include
``k`` kilobytes, ``m`` megabytes

--------

Files over 100 KB::

ls *(Lk+100)

----------------------
Globbing by Timestamps
----------------------

Time qualifiers: ``(m)`` modified, ``(a)`` last accessed, or ``(c)`` changed

Default unit is days, modifiers include:
``M`` months, ``w`` weeks, ``h`` hours, ``m`` minutes, ``s`` seconds

--------

File modified within the last two hours::

ls *(mh+2)

File modified between one and four days ago::

ls *(m-4m+1)

----------------------------------
Globbing Qualifiers with Arguments
----------------------------------

File owners
``(u:username:)``
File permissions (complicated)
``(f:chmod-options:)``

--------

Files not owned by root::

ls *(^u:root:)

Files that are group readable and writable, but not readable, writeable, or
executable by others::

ls *(f:g+rw,o-rwx:)

--------------
Alias Suffixes
--------------

Allow for default handlers based on file extensions::

alias -s php="/opt/local/share/vim/vim71/macros/less.sh"

--------------
Global Aliases
--------------

Examples::

alias -g H='| head'
alias -g T='| tail'
alias -g NUL="> /dev/null 2>&1"

Global aliases can be anywhere in a command::

cat somefile T

----------
Completion
----------

* compinit
* compinstall
* bashcompinit

Completion style syntax::

:completion:function:completer:command:argument:tag

Known hosts example::

zstyle -e ':completion:*:(ssh|scp|sshfs|ping|telnet|ftp):*'\
hosts 'reply=(${=${${(f)"$(cat\
{/etc/ssh_,$HOME/.ssh/known_}hosts(|2)(N)\
/dev/null)"}%%[# ]*}//,/ })'

------------------
Completion Caching
------------------

Cache expensive completions::

zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path ~/.zsh/cache

------------------
Completion Sorting
------------------

Sort specific completions::

zstyle ':completion:*:*:xdvi:*' menu yes select
zstyle ':completion:*:*:xdvi:*' file-sort time

---------------------
Completion Menu Demos
---------------------

``ls``::

oalug_demo1()
ls -<tab><tab>

``kill``::

kill <tab>

``chmod``::

chmod <tab>

---------
Resources
---------

* http://zsh.org/
* http://zshwiki.org/

.. vim:filetype=rst foldmethod=expr foldtext=foldtext()[0\:match(foldtext(),'\:')].'\ '.getline(v\:foldstart+1) foldexpr=getline(v\:lnum)=~'^-\\+$'&&getline(v\:lnum+1)=~'^\\w\\+.*$'&&getline(v\:lnum+2)=~'^-\\+$'?'>1'\:1
Binary file added oalug_2007-08-25_zsh/ui/default/blank.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added oalug_2007-08-25_zsh/ui/default/bodybg.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions oalug_2007-08-25_zsh/ui/default/framing.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/* The following styles size, place, and layer the slide components.
Edit these if you want to change the overall slide layout.
The commented lines can be uncommented (and modified, if necessary)
to help you with the rearrangement process. */

/* target = 1024x768 */

div#header, div#footer, .slide {width: 100%; top: 0; left: 0;}
div#header {top: 0; height: 3em; z-index: 1;}
div#footer {top: auto; bottom: 0; height: 2.5em; z-index: 5;}
.slide {top: 0; width: 92%; padding: 3.5em 4% 4%; z-index: 2; list-style: none;}
div#controls {left: 50%; bottom: 0; width: 50%; z-index: 100;}
div#controls form {position: absolute; bottom: 0; right: 0; width: 100%;
margin: 0;}
#currentSlide {position: absolute; width: 10%; left: 45%; bottom: 1em; z-index: 10;}
html>body #currentSlide {position: fixed;}

/*
div#header {background: #FCC;}
div#footer {background: #CCF;}
div#controls {background: #BBD;}
div#currentSlide {background: #FFC;}
*/
42 changes: 42 additions & 0 deletions oalug_2007-08-25_zsh/ui/default/iepngfix.htc
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<public:component>
<public:attach event="onpropertychange" />

<script>

// IE5.5+ PNG Alpha Fix v1.0 by Angus Turnbull http://www.twinhelix.com
// Free usage permitted as long as this notice remains intact.

// This must be a path to a blank image. That's all the configuration you need here.
var blankImg = 'ui/default/blank.gif';

var f = 'DXImageTransform.Microsoft.AlphaImageLoader';

function filt(s, m) {
if (filters[f]) {
filters[f].enabled = s ? true : false;
if (s) with (filters[f]) { src = s; sizingMethod = m }
} else if (s) style.filter = 'progid:'+f+'(src="'+s+'",sizingMethod="'+m+'")';
}

function doFix() {
if ((parseFloat(navigator.userAgent.match(/MSIE (\S+)/)[1]) < 5.5) ||
(event && !/(background|src)/.test(event.propertyName))) return;

if (tagName == 'IMG') {
if ((/\.png$/i).test(src)) {
filt(src, 'image'); // was 'scale'
src = blankImg;
} else if (src.indexOf(blankImg) < 0) filt();
} else if (style.backgroundImage) {
if (style.backgroundImage.match(/^url[("']+(.*\.png)[)"']+$/i)) {
var s = RegExp.$1;
style.backgroundImage = '';
filt(s, 'crop');
} else filt();
}
}

doFix();

</script>
</public:component>
7 changes: 7 additions & 0 deletions oalug_2007-08-25_zsh/ui/default/opera.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* DO NOT CHANGE THESE unless you really want to break Opera Show */
.slide {
visibility: visible !important;
position: static !important;
page-break-before: always;
}
#slide0 {page-break-before: avoid;}
15 changes: 15 additions & 0 deletions oalug_2007-08-25_zsh/ui/default/outline.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* don't change this unless you want the layout stuff to show up in the outline view! */

.layout div, #footer *, #controlForm * {display: none;}
#footer, #controls, #controlForm, #navLinks, #toggle {
display: block; visibility: visible; margin: 0; padding: 0;}
#toggle {float: right; padding: 0.5em;}
html>body #toggle {position: fixed; top: 0; right: 0;}

/* making the outline look pretty-ish */

#slide0 h1, #slide0 h2, #slide0 h3, #slide0 h4 {border: none; margin: 0;}
#slide0 h1 {padding-top: 1.5em;}
.slide h1 {margin: 1.5em 0 0; padding-top: 0.25em;
border-top: 1px solid #888; border-bottom: 1px solid #AAA;}
#toggle {border: 1px solid; border-width: 0 0 1px 1px; background: #FFF;}
Loading

0 comments on commit f15c976

Please sign in to comment.