Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: How to add a 'non-escaped' tilde to the completion list
- X-seq: zsh-workers 33670
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: How to add a 'non-escaped' tilde to the completion list
- Date: Tue, 11 Nov 2014 06:42:56 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=37nj6LChj0YKhmt2LYbBzrzhDg2qcRGAxN5SQ24rKXI=; b=o4w5PCEhOlVwfCcplSJqlMmtMFo4+KbtaM7ElZrabNiD7MCIY998qFSZLUumPvrFRw Sm23UierKh8KBE8quBI+96+jKuVzUQ3Qo7AF/MZirauJT09ke4pqNQMt+2cWbpbOOg2h EuaaiFbUmdhek4k7yVZM8VxlEp8es+4pgmMzK/rJX/vFgguKMlARWIKfe66EiZIZlSu4 InyD61SMSlUy519l3j3DfQ4MUGhihHAWxNz3gbfG+T0RTb1DMcSCqY4egcAQxLI8q6vx t7okgGpQZ+2La4RtHPiwUvoV8FpdtFyteOwme4rteOd1cvd3IRwmUOHTkSPSNDDsHMrR lfsA==
- In-reply-to: <1415656457-31967-1-git-send-email-mikachu@gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <17517.1415653425@thecus.kiddle.eu> <1415656457-31967-1-git-send-email-mikachu@gmail.com>
On Mon, Nov 10, 2014 at 10:54 PM, Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>
> p*)
> local -a pts pids
> local pt dir pid i suf desc
> pts=( /dev/pts/*(N) )
> pts=( ${pts#/dev/pts/} )
> for pt in ${(n)pts}; do
> pids=( $(pgrep -t pts/$pt zsh) )
> i=1
> suf=
> for pid in $pids; do
> zstat -A dir +link /proc/$pid/cwd 2> /dev/null
> desc="$pt$suf:"
> description+=( "${(r:8:)desc} ${(Q)${(D)dir}}" )
> vals+=( $pt:$i )
> (( i++ ))
> suf="[${i}]"
> done
> done
> print -rl - $vals
> keepdups=1
These last two lines should not be there :).
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author