On Thu, 2011-03-17 at 20:50 +-0300, ZyX wrote: +AD4 Reply to message +AKs-script to download scripts from vim.org+ALs, +AD4 sent 19:17:06 17 March 2011, Thursday +AD4 by Amit Agarwal: +AD4 +AD4 Some notes: +AD4 1. +AKs-grep pat1 +AHw grep pat2 +AHw sed 's/pat3/repl/g'+ALs can be replaced with a single +AD4 +AKs-sed '/pat1/+ACE d+ADs /pat2/+ACE d+ADs s/pat3/repl/g'+ALs. +AD4 2. Most tr calls can also be merged into sed command. +AD4 3. The whole +AD4 tr -d '+AFw-001'-'+AFw-011''+AFw-013''+AFw-014''+AFw-016'-'+AFw-037''+AFw-200'-'+AFw-377' +AD4 can be replaced with +AD4 trd+AD0AIg-tr -d '+AFwAXA-001-+AFwAXA-011+AFwAXA-013+AFwAXA-014+AFwAXA-016-+AFwAXA-037+AFwAXA-200-+AFwAXA-377'+ACI +AD4 +ACQ-trd +AD4 You don't need so many quotes and as it is widely used the you should either put +AD4 it into function or use a variable.
Yes, agree with this. This started with a one liner and became a complete script so forgot to do all this. Will make these changes. +AD4 4. Why are you using menu with +AGA-read read+AF8-choice' (and other reads) and not +AD4 command-line options? It reminds me of the time when I learned programming at +AD4 school and wrote programs with scanf() where now I use getopt. I wanted a while loop so that user can stay in the script and do multiple things in one go. Can getopts be used in that situation. Please help me on how to do it. +AD4 5. I would have used perl for it. And no HTML regex parsing+ACEAIQAh Personal preference, I would say. +AD4 6. Code should be put under VCS if you want someone to help you. For simple code +AD4 snippets there are gists on github, but I'd used fully-featured repositories on +AD4 bitbucket (not because github does not have ones alongside with gists, but +AD4 because I don't like git. On bitbucket gist request has status open and is two +AD4 years old). I am thinking of putting it into sf.net now. I just wanted to get a opinion first as to wheather it is useful or not. +AD4 +AD4 Original message: +AD4 +AD4 Hi All, +AD4 +AD4 +AD4 +AD4 I have written a script to download scripts for vim directly from the +AD4 +AD4 www.vim.org site. +AD4 +AD4 Please find a link to the same : +AD4 +AD4 http://blog.amit-agarwal.co.in/2011/03/09/all-in-one-solution-for-all-the-s +AD4 +AD4 cripts-of-vim-from-vim-org/ +AD4 +AD4 +AD4 +AD4 I would like to put that on www.vim.org site, if that is possible. +AD4 +AD4 Please help me with your comments and reviews and if you think this will +AD4 +AD4 be helpful for the vim users. -- Thanks, -aka http://blog.amit-agarwal.co.in http://shop.amit-agarwal.co.in http://amit-agarwal.com -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
