From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25612 invoked by alias); 3 Aug 2014 16:18:15 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 32943 Received: (qmail 11210 invoked from network); 3 Aug 2014 16:18:14 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=PRAPKBjrAUXieuFrknF9sZXsFYKRS5xSF40ecPqj6zU=; b=AM/wOA2ZvYhtkOLxOo855TeO/QJqw6t+CR9okmTqLxYcPFaN4OwCHZdXFCoTJ7WC+5 It5uh6+DKqhKDVcPv0NgOXHUvudkAdLuql0htRPqNMebzk5sGwe+k4JtqEseLngnmUTS J63DYfmOZb+7VVttw3+I/UbHAHAoRKLHNlT7u3WzZB5+7EGq1yoEIOxgwXAwyDiKfHNd Rkc3AYOJ6zlD5YzBIh/N3GdgX/8/RGT4VMcazU1XBKqdyc++nnTn+dsdDarq5V1q8reY KN1970pCFn8rirc9tnKO9nUnGCHnZ9Vl2fhS/Rc+CuSUEMF2DShIW4ONUgGYVgDdIDvf ysuw== X-Received: by 10.194.123.71 with SMTP id ly7mr24498698wjb.103.1407082691250; Sun, 03 Aug 2014 09:18:11 -0700 (PDT) MIME-Version: 1.0 From: Domagoj Pintaric Date: Sun, 3 Aug 2014 18:17:51 +0200 Message-ID: Subject: Custom auto complete To: zsh-workers@zsh.org Content-Type: multipart/alternative; boundary=089e0118419afb4f9504ffbbf7a5 --089e0118419afb4f9504ffbbf7a5 Content-Type: text/plain; charset=ISO-8859-1 Hello, I wold like to write my own zsh auto complete function/code but i need some reference to start with. This is is what i want to do: I wold like to parse the command that is currently typed and if there is a "?" char followed by a key press to show a menu of options to compete. So for example if I start typing: > cp ? i would like zsh to shows me a menu of strings to replace the "?" char with. Options would also have to be numerated so it would possible to write: >cp ?1 The strings I would like to be displayed would be stored in a file. If found some tutorials on how to write my own auto complete functions but the problem is I want this to work anywhere in the command string that is currently typed not just if i start with that command. I understand that the "?" char might have to be escaped or something but it's not important that the "trigger" char is "?" it can be something else. So my question is how do i get zsh to display a custom auto complete menu when I press and the previous char is, for example, "?". Regards, Domagoj --089e0118419afb4f9504ffbbf7a5--