From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 12978 invoked from network); 27 May 2021 22:06:12 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 27 May 2021 22:06:12 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-ID:Date:Content-ID: Content-Type:MIME-Version:Subject:To:References:From:In-reply-to:cc:Reply-To: Content-Transfer-Encoding:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=AiSG+ZrsZtq7VSBtUsrXn+s4GhfXGGm1H1J0N8beu1g=; b=bzEx3pFS7sB79BmpOBcuvYg/JU jbHDdtqfxPKwH7IMTPpWD8awr1rYFg1Hkc9JTbOxTzbru9XgPZ9KFRNtj0s2W3UFLfr0B9HUA251T AoHRp8PyCgpBFhdj7GWn7+50r+eeOYTTzLSPSGOaT7oaCVN4cWO1qDS7K2sF/HfNqEipybddAbcJ+ ErYeV08gnkJCYEqsQv6OZLoWZC5FGtx7vtFiCniTndS+y/zHeo+SU0JPCDXsnx+GtexcMUcrb/8xx 3oR4ACpXE3A5kVOYYnu7O2CAZrlYjs4N2i79+l6qzahAu+c05xIX//HSRt4795i/arg+A3fwWbAsc /nqWfRsQ==; Received: from authenticated user by zero.zsh.org with local id 1lmO8p-0006Qk-41; Thu, 27 May 2021 22:06:11 +0000 Received: from authenticated user by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1lmO8U-00069C-2h; Thu, 27 May 2021 22:05:50 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.94.2) (envelope-from ) id 1lmO8T-0001EA-7r; Fri, 28 May 2021 00:05:49 +0200 cc: zsh-workers@zsh.org In-reply-to: <48737102-54FB-4BB6-969E-9DDA65F3417F@kba.biglobe.ne.jp> From: Oliver Kiddle References: <48737102-54FB-4BB6-969E-9DDA65F3417F@kba.biglobe.ne.jp> To: "Jun. T" Subject: Re: [PATCH 0/2] _pandoc: avoid use of cache, etc. MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4720.1622153149.1@hydra> Date: Fri, 28 May 2021 00:05:49 +0200 Message-ID: <4721-1622153149.240316@WPfm.XbkI.5kzM> X-Seq: 48938 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On 26 Apr, "Jun. T" wrote: > I'm not sure the 'fold markers' {{{ }}} for vim editor > need be kept or not. I don't think so - they are editor specific and we only have them in a couple of files rather than them being consistently applied across many. Various editors, including vim, can parse a file to place folds where they make sense syntactically. And I don't think we should have editor specific markers for options either. That's what .editorconfig is for. This patch removes vim markers in _pandoc and a couple of other completion functions. They can also be found in files below Functions but I've not touched those. I'm open to other views if someone thinks this stuff would be useful. Oliver diff --git a/Completion/Unix/Command/_bpython b/Completion/Unix/Command/_bpython index 233e032e6..2c2ea11b8 100644 --- a/Completion/Unix/Command/_bpython +++ b/Completion/Unix/Command/_bpython @@ -41,6 +41,3 @@ case "$service" in "$gtk_opts[@]" ;; esac - - -# vim:autoindent expandtab shiftwidth=2 tabstop=2 softtabstop=2 filetype=zsh diff --git a/Completion/Unix/Command/_cdrdao b/Completion/Unix/Command/_cdrdao index ceb86267c..b634a2a28 100644 --- a/Completion/Unix/Command/_cdrdao +++ b/Completion/Unix/Command/_cdrdao @@ -2,7 +2,7 @@ # TODO: Options must come before parameters. -# Command completion and main loop {{{1 +# Command completion and main loop _cdrdao () { local ret=1 @@ -23,7 +23,7 @@ _cdrdao () { return ret } -# Common arguments {{{1 +# Common arguments declare -ga _cdrdao_tmpfile_args _cdrdao_tmpfile_args=( @@ -89,7 +89,7 @@ _cdrdao_common_read_args=( '--tao-source[indicate that source CD was written in TAO mode]' '--with-cddb[retrieve CD-TEXT data from a CDDB server]') -# Sub-command completion {{{1 +# Sub-command completion _cdrdao-show-toc () { __cdrdao-show-toc-or-toc-info-or-toc-size @@ -257,7 +257,7 @@ _cdrdao-copy () { $_cdrdao_paranoiamode_arg } -# Type completion {{{1 +# Type completion __cdrdao-device () { # Use cdrdao scanbus and also check what OS we're running under and provide @@ -280,6 +280,4 @@ __cdrdao-drivers () { fi } -# }}}1 - _cdrdao diff --git a/Completion/Unix/Command/_pandoc b/Completion/Unix/Command/_pandoc index 2ff481e32..bdd261322 100644 --- a/Completion/Unix/Command/_pandoc +++ b/Completion/Unix/Command/_pandoc @@ -1,6 +1,6 @@ #compdef pandoc -# {{{ input or output formats with optional extensions +# input or output formats with optional extensions # required option: -T (input|output) (( $+functions[_pandoc_format] )) || _pandoc_format() { @@ -16,8 +16,8 @@ _pandoc_format() { _wanted formats expl 'format' compadd -S '+' -r '-+ ' -a formats fi } -# }}} -# {{{ all supported formats + +# all supported formats (( $+functions[_pandoc_all_formats] )) || _pandoc_all_formats(){ local -a expl @@ -25,16 +25,16 @@ _pandoc_all_formats(){ formats=( $(pandoc --list-input-formats) $(pandoc --list-output-formats) ) _wanted formats expl 'format' compadd -a formats } -# }}} -# {{{ pdf engine choice + +# pdf engine choice (( $+functions[_pandoc_pdf_engine] )) || _pandoc_pdf_engine(){ _alternative \ 'engines:engine:(pdflatex lualatex xelatex latexmk tectonic wkhtmltopdf weasyprint prince context pdfroff)' \ 'engine-executables:engine executable:_files -g "*(#q*)"' } -# }}} -# {{{ options to pass to --pdf-engine command + +# options to pass to --pdf-engine command (( $+functions[_pandoc_pdf_engine_opts] )) || _pandoc_pdf_engine_opts(){ local pdf_engine=${opt_args[--pdf-engine]} @@ -47,8 +47,8 @@ _pandoc_pdf_engine_opts(){ ;; esac } -# }}} -# {{{ data-dir specified by --data-dir option, or the default dir + +# data-dir specified by --data-dir option, or the default dir _pandoc_default_dir() { if (( $+opt_args[--data-dir] )); then echo ${opt_args[--data-dir]:a} @@ -59,7 +59,8 @@ _pandoc_default_dir() { pandoc --version | sed -ne 's/.*[Uu]ser data directory: \([^ ]*\).*/\1/p' fi } -# {{{ template file in $PWD or data-dir/templates/, or URL + +# template file in $PWD or data-dir/templates/, or URL (( $+functions[_pandoc_template] )) || _pandoc_template(){ # find output format from '-t format' or '-o xxx.format' @@ -73,16 +74,16 @@ _pandoc_template(){ "data-dir-templates:template in data-dir:_files -W $template_dir -g $pat" \ 'urls: :_urls' } -# }}} -# {{{ choose highlight-style + +# choose highlight-style (( $+functions[_pandoc_highlight_style] )) || _pandoc_highlight_style(){ _alternative \ 'styles:style:( $(pandoc --list-highlight-styles) )' \ 'style-files:style file:_files -g "*.theme"' } -# }}} -# {{{ filter file in $PWD, data-dir/filters/ or $PATH + +# filter file in $PWD, data-dir/filters/ or $PATH (( $+functions[_pandoc_filter] )) || _pandoc_filter(){ local filters_dir=$(_pandoc_default_dir)/filters @@ -91,8 +92,8 @@ _pandoc_filter(){ 'data-dir-filters:filter in data-dir:_files -W filters_dir' \ 'commands: : _command_names -e' } -# }}} -# {{{ lua filter in $PWD or data-dir/filters/ + +# lua filter in $PWD or data-dir/filters/ (( $+functions[_pandoc_lua_filter] )) || _pandoc_lua_filter(){ local filters_dir=$(_pandoc_default_dir)/filters @@ -100,8 +101,8 @@ _pandoc_lua_filter(){ 'local-filters:local filter:_files -g "*.lua"' \ 'data-dir-filters:filter in data-dir:_files -W filters_dir -g "*.lua"' } -# }}} -# {{{ default file in $PWD or data-dir/defaults/ + +# default file in $PWD or data-dir/defaults/ (( $+functions[_pandoc_defaults_file] )) || _pandoc_defaults_file() { local defaults_dir=$(_pandoc_default_dir)/defaults @@ -109,8 +110,8 @@ _pandoc_defaults_file() { 'local-defaults:default file:_files -g "*.yaml"' \ 'data-dir-defaults:default in data-dir:_files -W defaults_dir -g "*.yaml"' } -# }}} -# {{{ choose reference location + +# choose reference location (( $+functions[_pandoc_reference_location] )) || _pandoc_reference_location(){ local -a policies @@ -121,14 +122,14 @@ _pandoc_reference_location(){ ) _describe 'location' policies } -# }}} -# {{{ choose top level division + +# choose top level division (( $+functions[_pandoc_top_level_division] )) || _pandoc_top_level_division(){ _values 'top level division' default section chapter part } -# }}} -# {{{ choose email obfusication + +# choose email obfusication (( $+functions[_pandoc_email_obfusication] )) || _pandoc_email_obfusication(){ local -a policies @@ -139,8 +140,8 @@ _pandoc_email_obfusication(){ ) _describe 'obfusication' policies } -# }}} -# {{{ choose wrapping policy + +# choose wrapping policy (( $+functions[_pandoc_wrap] )) || _pandoc_wrap() { local -a policies @@ -151,8 +152,8 @@ _pandoc_wrap() { ) _describe 'policy' policies } -# }}} -# {{{ choose eol policy + +# choose eol policy (( $+functions[_pandoc_eol] )) || _pandoc_eol() { local -a policies @@ -163,8 +164,8 @@ _pandoc_eol() { ) _describe 'policy' policies } -# }}} -# {{{ choose changes tracking policy + +# choose changes tracking policy (( $+functions[_pandoc_track_changes] )) || _pandoc_track_changes() { local -a policies @@ -175,7 +176,6 @@ _pandoc_track_changes() { ) _describe 'policy' policies } -# }}} # The real thing _arguments -s \