Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: List of unresolved issues



Bart Schaefer wrote:

> On Apr 13,  2:46pm, Sven Wischnowsky wrote:
> } Subject: Re: List of unresolved issues
> } 
> } Bart Schaefer wrote:
> } 
> } > Some of these may actually have been resolved and I just forgot/missed it.
> } > Also, these are only issues raised in messages I sent myself.
> } > 
> } > ...
> } > 10187		combining multiple zstyle commands into one
> } 
> } I offer to write it when you folks decide that we want it.
> 
> Actually, I now think the shell function implementation is fine.  Maybe
> just copy that function into Functions/Misc?
> 
> I don't care about the -L output part.

In that case I would have voted for the function, too.

I don't understand why it uses case instead of if/else, though:

  zmultstyle() {
    if [[ $1 = -* ]]; then
      zstyle "$@"
    else
      setopt localoptions noksharrays
      integer i
      local context="$1"
      1=''
      for ((i=2; $#; ++i)); do
        if [[ $i -gt $# || "$argv[i]" == '+' ]]; then
          zstyle "$context${(@)argv[1,i-1]}"
  	shift "i > $# ? $# : i"  # Stupid shift error on i > $#
  	i=1
        fi
      done
    fi
  }

The `zMULTstyle' and the missing `builtin's: I would be against naming
it just `zstyle' for two reasons: 1) speed in the completion functions
which don't need this shortcut syntax because it's only for defining
styles and 2) _complete_help needs to define a zstyle function itself
to collect the style information (if requested). And _complete_help is 
too lazy to restore it because it thinks there shouldn't be a function 
with the name `zstyle' because of 1).

So, I haven't added/committed this because there probably is a better
name than zmultstyle. Yes?

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author