I would like to change the RFC as follows.

1. Addition of -U option

The default options are used only when -U (--use-default)
option is specified. It is provided for the each command.

$ global -x main                # without default options
$ global -xU main               # use default options

The reason is for preventing bad influences to applications
which use GLOBAL. For example, if GLOBAL_OPTIONS is set to '-G'
then the following command will fail.

global "<extended regular expression>" ...

Since there are many tools which use GLOBAL, we should not add
changes which break what are working now.

2. Change of option names

* -N (--project) -> -F (--first-match)

  Because this option is not limited to a project.

* -m (--match-case) -> -M (--match-case)

  The reason is for reservation of -m option for another use.
  A small letter option is already precious resource.

3. Deprecated configuration variables

These will be removed in the future.

deprecated      substitute
-------------------------------------
htags_options   HTAGS_OPTIONS
ncol            -n, --line-number [columns]
tabs            --tabs cols
-------------------------------------

An example of rewriting method:

[gtags.conf]
:htags_options=-v:ncol#4:tabs#8:
=> :HTAGS_OPTIONS=-v --line-number=4 --tabs=8:

Any comment?



2014-03-27 12:29 GMT+09:00 Shigio YAMAGUCHI <[email protected]>:

> Hi all,
> I propose new useful mechanism for specifying options.
> These most are jason's idea.
>
> 1. Tree Environment variables
>
> Environment variable    Target command
> --------------------------------------
> GLOBAL_OPTIONS          global
> GTAGS_OPTIONS           gtags
> HTAGS_OPTIONS           htags
> --------------------------------------
>
> Offering three environment variables which define individual
> default options for global(1), gtags(1) and htags(1),
> respectively.
>
> The value of each variable is inserted at the head of
> the command options. For example, when GLOBAL_OPTIONS
> is set to '--color=always --through', 'global -x main'
> is executed as 'global --color=always --through -x main'.
>
> Since priority is given to options specified later,
> you can overwrite the default options.
>
> $ export GLOBAL_OPTIONS=--result=ctags-x
> $ global main --result=grep     # print grep format
>
> 2. Three options
>
> New options             options overwritten
> ---------------------------------------------
> -E (--extended-regexp)  -G (--basic-regexp)
> -N (--project)          -T (--through)
> -m (--match-case)       -i (--ignore-case)
>
> Adding three options for specifying the system default
> of global(1). They are convenient to use the environment
> variables described in 1.
>
> If GLOBAL_OPTIONS is set to '--ignore-case', then
> global command works like follows:
>
> $ global -x main        # case in-sensitive search
> $ global -x main -m     # case sensitive search
>
> 3. Three configuration variables
>
> Adding three configuration variables of the same name
> as the environment variables described in 1.
>
> Example:
> [gtags.conf]
>         :GLOBAL_OPTIONS=--ignore-case:\
>         :GTAGS_OPTIONSS=--idutils:\
>         :HTAGS_OPTIONS=-gs:...
>
>
> Each environment variable is given more priority than configuration
> variable of the same name. 'htags_options' will be deprecated.
>
> This rule should be applied to any environment variable used in GLOBAL
> someday, I think.
>
> Any comment?
> --
> Shigio YAMAGUCHI <[email protected]>
> PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3
>



-- 
Shigio YAMAGUCHI <[email protected]>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3
_______________________________________________
Bug-global mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-global

Reply via email to