* bug in sed completion @ 2005-11-09 22:05 Marc Chantreux 2005-11-09 22:08 ` Dan Nelson 0 siblings, 1 reply; 7+ messages in thread From: Marc Chantreux @ 2005-11-09 22:05 UTC (permalink / raw) To: zsh-workers Hi all, I've discovered a bug in the sed -i completion : % sed -i <tab> suffix for backup sed script that's right ... but : % sed -i 's/x//' <tab> sed script wrong ! sed script already written, it's time to give sed filenames. I'm sorry to not submit a patch but i'm still not skilled with completion. regards mc ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bug in sed completion 2005-11-09 22:05 bug in sed completion Marc Chantreux @ 2005-11-09 22:08 ` Dan Nelson 2005-11-09 23:02 ` Marc Chantreux 0 siblings, 1 reply; 7+ messages in thread From: Dan Nelson @ 2005-11-09 22:08 UTC (permalink / raw) To: Marc Chantreux; +Cc: zsh-workers In the last episode (Nov 09), Marc Chantreux said: > Hi all, > > I've discovered a bug in the sed -i completion : > > % sed -i <tab> > suffix for backup > sed script > > that's right ... but : > > % sed -i 's/x//' <tab> > sed script > > wrong ! sed script already written, it's time to give sed filenames. Doesn't that mean you want your backup extension to be "s/x//" ? If you don't want a backup, use -i "". -- Dan Nelson dnelson@allantgroup.com ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bug in sed completion 2005-11-09 22:08 ` Dan Nelson @ 2005-11-09 23:02 ` Marc Chantreux 2005-11-10 3:50 ` Bart Schaefer 0 siblings, 1 reply; 7+ messages in thread From: Marc Chantreux @ 2005-11-09 23:02 UTC (permalink / raw) To: zsh-workers Dan Nelson a écrit : >Doesn't that mean you want your backup extension to be "s/x//" ? > no, it means that i don't need backup ( i alreasy have one in my DAT ;-) ). > If >you don't want a backup, use -i "". > > sed don't need it, so the zsh completion don't have to (IMHO). regards ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bug in sed completion 2005-11-09 23:02 ` Marc Chantreux @ 2005-11-10 3:50 ` Bart Schaefer 2005-11-10 8:15 ` Marc Chantreux 0 siblings, 1 reply; 7+ messages in thread From: Bart Schaefer @ 2005-11-10 3:50 UTC (permalink / raw) To: Marc Chantreux, zsh-workers On Nov 10, 12:02am, Marc Chantreux wrote: } Subject: Re: bug in sed completion } } Dan Nelson a écrit : } } >Doesn't that mean you want your backup extension to be "s/x//" ? } > } no, it means that i don't need backup ( i alreasy have one in my DAT ;-) ). If I'm reading the GNU sed docs correctly, the following patch should do it. Of course the first chunk of this is probably wrong for non-GNU with --expression / --file, but I no longer have access to anything but Linux machines so someone else will have to fix up that part. This also fixes a typo (too many sss). Index: Completion/Unix/Command/_sed =================================================================== diff -c -r1.1 _sed --- Completion/Unix/Command/_sed 12 Mar 2004 18:05:54 -0000 1.1 +++ Completion/Unix/Command/_sed 10 Nov 2005 03:44:47 -0000 @@ -4,16 +4,16 @@ args=( '(-n --quiet --silent)'{-n,--quiet,--silent}'[suppress automatic printing of pattern space]' - '(1)*'{-e,--expresssion=}'[add sed commands to run]:sed script' - '(1)*'{-f,--file=}'[add contents of file to commands to run]:file:_files' + '(1)*'{-e,--expression=-}'[add sed commands to run]:sed script' + '(1)*'{-f,--file=-}'[add contents of file to commands to run]:file:_files' '(-e)1: :_guard "^-*" sed script' ':input file:_files' ) if _pick_variant gnu=GNU unix --version; then args+=( - '(-i --in-place)'{-i,--in-place=}'[edit files in place]::suffix for backup' - '(-l --line-length)'{-l,--line-length=}'[specify line-wrap length for the l command]' + '(-i --in-place)'{-i-,--in-place=-}'[edit files in place]::suffix for backup' + '(-l --line-length)'{-l,--line-length=-}'[specify line-wrap length for the l command]' '(-r --regexp-extended)'{-r,--regexp-extended}'[use extended regular expressions]' '(-s --separate)'{-s,--separate}'[consider files separately instead of as a combined stream]' '(-u --unbuffered)'{-u,--unbuffered}'[disable data buffering]' -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bug in sed completion 2005-11-10 3:50 ` Bart Schaefer @ 2005-11-10 8:15 ` Marc Chantreux 2005-11-10 8:54 ` Bart Schaefer 0 siblings, 1 reply; 7+ messages in thread From: Marc Chantreux @ 2005-11-10 8:15 UTC (permalink / raw) To: zsh-workers Bart Schaefer wrote: i have applied your patch but it has no effect. peraps because i failed to recompile Completion.zwc. To be sure : i've used zsh Completion.zwc Completion/**/_*(^/) regards ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bug in sed completion 2005-11-10 8:15 ` Marc Chantreux @ 2005-11-10 8:54 ` Bart Schaefer 2005-11-10 9:14 ` Marc Chantreux 0 siblings, 1 reply; 7+ messages in thread From: Bart Schaefer @ 2005-11-10 8:54 UTC (permalink / raw) To: zsh-workers On Nov 10, 9:15am, Marc Chantreux wrote: } } i have applied your patch but it has no effect. peraps because i failed } to recompile Completion.zwc. That must be it. Works for me: zsh% sed -i<TAB> Completing suffix for backup Completing option --in-place -- edit files in place zsh% sed -i <TAB> Completing sed script zsh% sed -i s/x/y/ <TAB> Completing input file } To be sure : i've used zsh Completion.zwc Completion/**/_*(^/) I don't know what that means. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: bug in sed completion 2005-11-10 8:54 ` Bart Schaefer @ 2005-11-10 9:14 ` Marc Chantreux 0 siblings, 0 replies; 7+ messages in thread From: Marc Chantreux @ 2005-11-10 9:14 UTC (permalink / raw) To: zsh-workers Bart Schaefer wrote: > That must be it. Works for me so i'll find the way to compile completion definitions by myself. Thanks for your help! regards mc ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-11-10 9:14 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2005-11-09 22:05 bug in sed completion Marc Chantreux 2005-11-09 22:08 ` Dan Nelson 2005-11-09 23:02 ` Marc Chantreux 2005-11-10 3:50 ` Bart Schaefer 2005-11-10 8:15 ` Marc Chantreux 2005-11-10 8:54 ` Bart Schaefer 2005-11-10 9:14 ` Marc Chantreux
Code repositories for project(s) associated with this public inbox https://git.vuxu.org/mirror/zsh/ This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).