From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15814 invoked by alias); 18 Feb 2015 21:12:45 -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: 19880 Received: (qmail 14474 invoked from network); 18 Feb 2015 21:12:40 -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=-1.9 required=5.0 tests=BAYES_00,T_FROM_12LTRDOM autolearn=ham version=3.3.2 Date: Wed, 18 Feb 2015 22:12:38 +0100 From: Adrian X-Priority: 3 (Normal) Message-ID: <175130884.20150218221234@planetcoding.net> To: zsh-users@zsh.org Subject: Re[2]: Some questions (menu completion and two-line prompts) In-Reply-To: <150217200443.ZM20193@torch.brasslantern.com> References: <1603240867.20150218013647@planetcoding.net> <150217200443.ZM20193@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="pgp-sha1"; boundary="----------11A1B715E0169C45D" ------------11A1B715E0169C45D Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Hi > TRAPWINCH() { > zle && echo '' && prompt_adam2_precmd && zle reset-prompt > } Thanks, that works perfectly fine! > } - I'm using AUTO_MENU so I first get a list of completion candidates > } and then menu selection by pressing tab once again. That's fine, but > } in cases where the candidate list is very long (i.e. doesn't fit on > } the screen), I'd rather get menu selection mode immediately instead > Try something like > zstyle ':completion:*' menu yes=3Dlong select=3Dlong with that setting I get the correct behavior for cases with a long list, but in other cases I don't get any menu completion (instead of the automenu-style completion I was expecting). In case it matters, thse are my completion-related shellopts: setopt ALWAYS_LAST_PROMPT setopt AUTO_LIST setopt AUTO_MENU setopt AUTO_NAME_DIRS setopt AUTO_PARAM_KEYS setopt AUTO_PARAM_SLASH unsetopt AUTO_REMOVE_SLASH unsetopt BASH_AUTO_LIST unsetopt COMPLETE_ALIASES setopt COMPLETE_IN_WORD unsetopt GLOB_COMPLETE setopt HASH_LIST_ALL setopt LIST_AMBIGUOUS unsetopt LIST_BEEP setopt LIST_PACKED setopt LIST_ROWS_FIRST setopt LIST_TYPES unsetopt MENU_COMPLETE unsetopt REC_EXACT Also, another thing I've noticed, with the following zstyles that should give me a prettier process list: zstyle ':completion:*:*:*:*:processes' force-list always zstyle ':completion:*:*:*:*:processes' menu yes select zstyle ':completion:*:*:*:*:processes' list-colors '=3D(#b) #([0-9]#) ([0-9= a-z-]#)*=3D01;34=3D0=3D01' zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,arg= s -w -w" This works fine for `kill` or `renice`, but for some reason `strace -p` uses the custom command , force-list and immediately goes into a menu. However, it doesn't use the colors. This is the full completion debug log from ^X? for the strace completion: https://gist.github.com/ThiefMaster/f8ffa55988e075e4dc10 -- Adrian ------------11A1B715E0169C45D Content-Type: application/pgp-signature -----BEGIN PGP MESSAGE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJU5QBGAAoJELBxzRMYTXGcxcQP/1y6QcgDQSWrwn8VCKEGJA4P HkcYk29dzHVp0GorfuQaITTcZ35efBWSLUiTMbZ5R7fHk0VWJbGfYjH60bIJSEUz wkYXiDb1zvGeEdnlqG4gUr04bi1WJUjnNvm0fXVJkZNAsiW1yEQT+GSBgMjcXfu+ OurOioY064ByRNwpqaBc24qb43LEqFHgtmrZ2oiuwqohBZkCn5D7y1Ufc8m8pApu E7yNyTj3GsNVQeAbS88znPlps9UzvSmfMACXTmQm/vIuIw0jU1eVdvqBKwpkcadq TsiPrQqqyIRoiTscvNXT+BMsy0TBnAUVTvJjBQyJ6FCMUhTV+74GQNO4gcK/2VF8 PCN8L1HpE9n0wq1N3jXeNUcX6JbBFMapmSrXfj4Trt+Lrx5G7q+gw00S1LL0djrq zzduqp+wpBQVtLYYsNn2J1tteNEww1CheKfn+DWC5RtLv3b3IpCejmashxT5LlVI fI0ET0k1+q7u9KNd39O6HXXyHeIrzQOFB8oe7JVR8M8tnGx7B/aVI8vOk1uZ+nv3 OBbTc4btbsX2zkFSR0DSCvUogZ5Dn51qpgUQkyWh7jf+9i5CaGxw1+59GbjM7HZ9 cNKTpniYW+50mzhtJ5Oq4e/U2H5xGcsJeYL8W92uwhH2BhHYT8pwaKa2UCezdgy9 0ULJVzpFVhwqfMUfELTa =nvaU -----END PGP MESSAGE----- ------------11A1B715E0169C45D--