From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4844 invoked from network); 4 Mar 2002 23:27:10 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 4 Mar 2002 23:27:10 -0000 Received: (qmail 7785 invoked by alias); 4 Mar 2002 23:27:05 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16762 Received: (qmail 7774 invoked from network); 4 Mar 2002 23:27:04 -0000 Date: Tue, 5 Mar 2002 00:26:01 +0100 From: Bruno Bonfils To: zsh-workers@sunsite.dk Subject: add alias from ~/.muttrc to completion Message-ID: <20020304232601.GA6095@syd-barrett.hash-group.net> Mail-Followup-To: Bruno Bonfils , zsh-workers@sunsite.dk Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="i0/AhcQY5QxfSsSZ" Content-Disposition: inline User-Agent: Mutt/1.3.27i --i0/AhcQY5QxfSsSZ Content-Type: multipart/mixed; boundary="NzB8fVQJ5HfG6fxh" Content-Disposition: inline --NzB8fVQJ5HfG6fxh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable hi, all in the title ! comments are welcome (may be there is a more simple solution for extract alias from muttrc) thx --=20 Bruno Bonfils Admin Sys GNU/Linux http://speka.net http://hash-group.net http://zshfr.org --NzB8fVQJ5HfG6fxh Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="_mutt.diff" Content-Transfer-Encoding: quoted-printable 7c7 < '::recipient:->userhost' \ --- > '::recipient:->userhostalias' \ 28c28 < if [[ "$state" =3D userhost ]]; then --- > if [[ "$state" =3D userhostalias ]]; then 33a34 > =20 35c36,53 < _users "$expl[@]" -q -S "$suf" && return 0 --- > _users "$expl[@]" -q -S "$suf" >=20 > # added by asyd (20020304) > if [ -r ~/.muttrc ]; then >=20 > # use cache > if ( [[ ${+_list_alias} -eq 0 ]] || _cache_invalid mutt_alias ) && > ! _retrieve_cache mutt_alias; then > =20 > _list_alias=3D(${(o)${${(M)${(f)"$(< ~/.muttrc)"}##alias*}/alia= s /}%% *}) > =20 > _store_cache mutt_alias _list_alias > fi > =20 > _wanted alias expl 'alias name' compadd -q -S, $_list_alias=20 > fi > return 0 > =20 --NzB8fVQJ5HfG6fxh-- --i0/AhcQY5QxfSsSZ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: Pour information voir http://www.gnupg.org iEYEARECAAYFAjyEAokACgkQ8dj4f/OdzPUtBACePg014y51/wW7DhnUVxUoYnZl Am8AoK+26LOKnOmRTCTYXyjzYXx9RsJz =uxBA -----END PGP SIGNATURE----- --i0/AhcQY5QxfSsSZ--