From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19244 invoked by alias); 2 Jun 2016 05:30:35 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 21601 Received: (qmail 20448 invoked from network); 2 Jun 2016 05:30:34 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=HtB2KObEEiSvQrDZxiNNqX8HllhJqgyaSa4dmFseWb8=; b=RKwS6fVnm4sxv1Pj4s+aobCK0n22nuAHbrunGY+TrdH8umyVR2qeIyvDejK5Kyh7Iq HH1nHBQVNLUKTS0XK+u2qSW4dW+Q/4qdmXE90RwwfEJeLqI7rhOPHsi4kD/q+z4rfegM mRH3RdslWcd66r+hA7vXb5S/iLlcvfZvpH/rxdBMHk2tdmUvb9mR90O3Dz1gfv3G6fSz 1v7SyfVDVu6n6A55dU/GKBvMjesEv+1dgFR/uXgdcxbz5ATc509ip8+Gi697BNQ2hzb5 EVX7k+eF847N2tPzgpbkjs6A8ZxpUXe0cu66EJyr2trLyvC88eH4xV8EVCDqozrecsqB +kHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version; bh=HtB2KObEEiSvQrDZxiNNqX8HllhJqgyaSa4dmFseWb8=; b=b/Bxq1Fuvvh8Ojs4z+snGHHL19FdE7WpkFuWl/Q4fgFHzzglM6JcrDT702HaaoUm9J f6qh3HvFO2/JPBaHJdpYaDPR8cSIpynS9K3ZEhrGjqSgMo9XVlVeEl2o1N/ymR6hn3Jg AtImMb0xj7Sm+HzV9J+F74jAGwD6vDgLm3M7RK6M79Jo2jtQzSdFQzL5zQhXLZn/ZVni A9hQ/NncDtJhXra3ftSniA/vrc/DJwgeZmlkSBd42Nm0IygTi2bJZetVF1bZsIv9LYSs EfbGaxQpTjp728POwPqcyzEIKzvOhhroY4OHclCgXHbv4QIEzDX6O5zVW1l5oXplEzti kYAw== X-Gm-Message-State: ALyK8tJkNqUm92ZQeF+iH7oYJhPotLh5mRARZIUfEb233mlNEw0OUEXQWZvVEZe7bziHZA== X-Received: by 10.98.70.3 with SMTP id t3mr1062247pfa.147.1464845433128; Wed, 01 Jun 2016 22:30:33 -0700 (PDT) From: Bart Schaefer Message-Id: <160601223030.ZM14495@torch.brasslantern.com> Date: Wed, 1 Jun 2016 22:30:30 -0700 In-Reply-To: <573D7E67.10600@mathphys.fsk.uni-heidelberg.de> Comments: In reply to Paul Seyfert "_gnu_generic for aliases" (May 19, 10:50am) References: <573D7E67.10600@mathphys.fsk.uni-heidelberg.de> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh Users Subject: Re: _gnu_generic for aliases MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On May 19, 10:50am, Paul Seyfert wrote: } } I crosschecked that also } } compdef _gnu_generic fancyalias } } does not result in any suggestions. My understanding is that the } _gnu_generic function does not know about the fancyalias / I cannot use } the fancyalias inside the _gnu_generic function. } } Is there a way to make _gnu_generic work for aliases? Have you tried "setopt complete_aliases" ? Unfortunately it's not easily possible to have it both ways, that is, to treat an alias as something you can "compdef" and ALSO have the alias be expanded to use the completion for the command it eventually becomes. This might work a lot of the time: setopt complete_aliases _expand_alias_and_complete() { if [[ -o complete_aliases && -n $aliases[$words[1]] ]]; then words[1]=( $aliases[$words[1]] ) _complete else return 1 fi } zstyle ':completion:*' completer _complete __expand_alias_and_complete Needs tweaking based on the rest of your current "completer" style, but hopefully you get the idea.