Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Useless assignment in _rm
- X-seq: zsh-workers 46103
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsugabubus <zsugabubus@national.shitposting.agency>
- Subject: Re: Useless assignment in _rm
- Date: Tue, 23 Jun 2020 12:40:15 +0000
- Cc: zsh-workers@xxxxxxx
- In-reply-to: <20200622102738.56fotlwrsbckxgzh@localhost>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20200621120913.tk5caqwb3ob2r6wt@localhost> <20200621133257.2c4b679d@tarpaulin.shahaf.local2> <20200622102738.56fotlwrsbckxgzh@localhost>
- Sender: zsh-workers@xxxxxxx
zsugabubus wrote on Mon, 22 Jun 2020 12:27 +0200:
> diff --git a/Completion/Unix/Command/_rm b/Completion/Unix/Command/_rm
> index ea9190d..e66b77f 100644
> --- a/Completion/Unix/Command/_rm
> +++ b/Completion/Unix/Command/_rm
> @@ -69,7 +69,7 @@ _arguments -C -s -S $opts \
>
> case $state in
> (file)
> - line[CURRENT]=()
> + (( CURRENT > 0 )) && line[CURRENT]=()
> line=( ${line//(#m)[\[\]()\\*?#<>~\^\|]/\\$MATCH} )
> _files -F line && ret=0
> ;;
Thanks; I'll commit this unless someone sees a reason not to.
In the future, could you put patches _above_ the dash-dash-space line?
Many MUAs trim by default everything after that line.
Thanks,
Daniel
Messages sorted by:
Reverse Date,
Date,
Thread,
Author