~ubuntu-branches/ubuntu/karmic/zsh/karmic

« back to all changes in this revision

Viewing changes to Test/D03procsubst.ztst

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2009-06-02 10:40:25 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20090602104025-lg6wynxpzqi08k2i
Tags: 4.3.10-1ubuntu1
* Resynchronise with Debian. Remaining changes:
  + debian/zshrc: Enable completions by default, unless
    skip_global_compinit is set

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
0:FDs remain open for external commands called from functions
37
37
>First
38
38
>Zweite
 
39
 
 
40
  catfield2() {
 
41
    local -a args
 
42
    args=(${(s.,.)1})
 
43
    print $args[1]
 
44
    cat $args[2]
 
45
    print $args[3]
 
46
  }
 
47
  catfield2 up,<(print $'\x64'own),sideways
 
48
0:<(...) when embedded within an argument
 
49
>up
 
50
>down
 
51
>sideways
 
52
 
 
53
  outputfield2() {
 
54
    local -a args
 
55
    args=(${(s.,.)1})
 
56
    print $args[1]
 
57
    echo 'How sweet the moonlight sits upon the bank' >$args[2]
 
58
    print $args[3]
 
59
  }
 
60
  outputfield2 muddy,>(sed -e s/s/th/g >outputfield2.txt),vesture
 
61
  # yuk
 
62
  while [[ ! -e outputfield2.txt || ! -s outputfield2.txt ]]; do :; done
 
63
  cat outputfield2.txt
 
64
0:>(...) when embedded within an argument
 
65
>muddy
 
66
>vesture
 
67
>How thweet the moonlight thitth upon the bank
 
68
 
 
69
  catfield1() {
 
70
    local -a args
 
71
    args=(${(s.,.)1})
 
72
    cat $args[1]
 
73
    print $args[2]
 
74
  }
 
75
  catfield1 =(echo s$'\x69't),jessica
 
76
0:=(...) followed by something else without a break
 
77
>sit
 
78
>jessica
 
79
 
 
80
  (
 
81
  setopt nonomatch
 
82
  # er... why is this treated as a glob?
 
83
  print everything,=(here is left),alone
 
84
  )
 
85
0:=(...) preceded by other stuff has no special effect
 
86
>everything,=(here is left),alone