require 'formula' class Cdargs < Formula homepage 'http://www.skamphausen.de/cgi-bin/ska/CDargs' url 'http://www.skamphausen.de/downloads/cdargs/cdargs-1.35.tar.gz' sha1 '20017d09d3259fcd1385754554a3e17a1c975f9b' fails_with :llvm do build 2334 cause "Bus error in ld on SL 10.6.4" end # fixes zsh usage using the patch provided at the cdargs homepage # (See http://www.skamphausen.de/cgi-bin/ska/CDargs) patch :DATA def install system "./configure", "--prefix=#{prefix}", "--mandir=#{man}" system "make" system "make install-strip" rm Dir['contrib/Makefile*'] prefix.install 'contrib' bash_completion.install_symlink "#{prefix}/contrib/cdargs-bash.sh" end def caveats; <<-EOS.undent Support files for bash, tcsh, and emacs have been installed to: #{prefix}/contrib EOS end end __END__ diff --git a/contrib/cdargs-bash.sh b/contrib/cdargs-bash.sh index 8a197ef..f3da067 100644 --- a/contrib/cdargs-bash.sh +++ b/contrib/cdargs-bash.sh @@ -11,6 +11,12 @@ CDARGS_SORT=0 # set to 1 if you want mark to sort the list CDARGS_NODUPS=1 # set to 1 if you want mark to delete dups +# Support ZSH via its BASH completion emulation +if [ -n "$ZSH_VERSION" ]; then + autoload bashcompinit + bashcompinit +fi + # --------------------------------------------- # # Run the cdargs program to get the target # # directory to be used in the various context # @@ -166,7 +172,7 @@ function mark () local tmpfile # first clear any bookmarks with this same alias, if file exists - if [[ "$CDARGS_NODUPS" && -e "$HOME/.cdargs" ]]; then + if [ "$CDARGS_NODUPS" ] && [ -e "$HOME/.cdargs" ]; then tmpfile=`echo ${TEMP:-${TMPDIR:-/tmp}} | sed -e "s/\\/$//"` tmpfile=$tmpfile/cdargs.$USER.$$.$RANDOM grep -v "^$1 " "$HOME/.cdargs" > $tmpfile && 'mv' -f $tmpfile "$HOME/.cdargs"; mebrew/log/Library/Formula/mcpp.rb'>
path: root/Library/Formula/mcpp.rb
blob: 4d3f9461e8de72e056a36b9a339d0a7d334f5def (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133