1 |
On Wednesday 23 May 2012 21:04:42 hasufell wrote: |
2 |
> # @FUNCTION: _iconins |
3 |
> # @DESCRIPTION: |
4 |
> # function for use in doicon and newicon |
5 |
|
6 |
mark it @INTERNAL |
7 |
|
8 |
> if [[ -z $size ]] ; then |
9 |
|
10 |
${size} |
11 |
|
12 |
> if [[ $function == doicon ]] ; then |
13 |
|
14 |
${function} |
15 |
|
16 |
> if [[ $function == newicon ]] ; then |
17 |
|
18 |
${function} |
19 |
|
20 |
> doicon() { |
21 |
> local function=$FUNCNAME |
22 |
> _iconins "$@" |
23 |
|
24 |
passing the funcname in this way is kind of ugly. you could do: |
25 |
_iconins ${FUNCNAME} "$@" |
26 |
|
27 |
and then at the top of _iconins: |
28 |
local funcname=$1; shift |
29 |
|
30 |
i guess if we all agree this complication is useful, then fix the nits and |
31 |
let's merge it |
32 |
-mike |