Re: r! not working in any case ?
Meino Christian Cramer wrote: Hi, from :h r! I read that r! cmd can be used to transfer text given by a cmd via stdout into a buffer. I am using zsh 4.3.2 and have defined an alias of this form alias hcnf='./configure --help' . I wanted to insert the expanded alias into a zsh-script, which I wanted to edit with vim. Therefore I did in vim (with the buffer containing the zsh-script): :r! alias hcnf and got shell returned 1 Press ENTER to type command to continue . But alias hcnf and alias hcnf | less given on the commandline to proof, that stdout is used (instead of stderr) works fine. I cannot find the error I did Thank you very much in advance for any help ! :) Have a nice weekend! mcc The :r! command gives the same result than 'zsh -c command' (if you haven't changed shellcmdflag). It doesn't use an interactive shell so if you have define your alias in .zshrc it won't be recognized. In that case, ry putting it in .zshenv instead. koxinga
Re: r! not working in any case ?
From: koxinga [EMAIL PROTECTED] Subject: Re: r! not working in any case ? Date: Sun, 29 Oct 2006 10:20:16 +0100 Meino Christian Cramer wrote: Hi, from :h r! I read that r! cmd can be used to transfer text given by a cmd via stdout into a buffer. I am using zsh 4.3.2 and have defined an alias of this form alias hcnf='./configure --help' . I wanted to insert the expanded alias into a zsh-script, which I wanted to edit with vim. Therefore I did in vim (with the buffer containing the zsh-script): :r! alias hcnf and got shell returned 1 Press ENTER to type command to continue . But alias hcnf and alias hcnf | less given on the commandline to proof, that stdout is used (instead of stderr) works fine. I cannot find the error I did Thank you very much in advance for any help ! :) Have a nice weekend! mcc The :r! command gives the same result than 'zsh -c command' (if you haven't changed shellcmdflag). It doesn't use an interactive shell so if you have define your alias in .zshrc it won't be recognized. In that case, ry putting it in .zshenv instead. koxinga Hi koxinga, flat-hand-against-my-front-head-effect! :) Yes, I should have known this...but... Thanks for your help! Keep hacking! mcc
r! not working in any case ?
Hi, from :h r! I read that r! cmd can be used to transfer text given by a cmd via stdout into a buffer. I am using zsh 4.3.2 and have defined an alias of this form alias hcnf='./configure --help' . I wanted to insert the expanded alias into a zsh-script, which I wanted to edit with vim. Therefore I did in vim (with the buffer containing the zsh-script): :r! alias hcnf and got shell returned 1 Press ENTER to type command to continue . But alias hcnf and alias hcnf | less given on the commandline to proof, that stdout is used (instead of stderr) works fine. I cannot find the error I did Thank you very much in advance for any help ! :) Have a nice weekend! mcc