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

Re: [PATCH] new completions for head and tail commands



On Tue, Oct 27, 2015 at 1:34 PM, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> Jun T. wrote on Tue, Oct 27, 2015 at 22:44:47 +0900:
>> +  opts='-A "-*"'
>> +  args=( '(-c)-n+[display the first specified lines]:number of lines' )
>> +  case $OSTYPE in
>> +    (freebsd*|darwin*|dragonfly*|netbsd*)
>> +      args+=( '(-n)-c+[display the first specified bytes]:number of bytes' )
>> +      ;;
>> +  esac
>> +fi
>> +
>> +_arguments -C -s -S $opts : $args '*:file:_files' && return 0
>
> Should that be ${=opts}?

Or opts=(-A "-*") more likely.



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