Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config file support v2 - ported merge of ggreer/the_silver_searcher#709 #1

Merged
merged 3 commits into from
Jun 13, 2023

Conversation

trinitronx
Copy link
Owner

(Forward-)ported merge of ggreer#709

Changes:

decaff and others added 3 commits July 2, 2015 17:40
Implementation is based on PR ggreer#257, authored by David Schlosnagle.

Ag reads OPTIONS from one of several configuration files.  Ag processes "config
file"  options  before  command-line options.  The config file format is very
simple:

    # this is a comment => inline comments not supported
    # blank lines okay as well

    --long-option[=value]
    -short-option[=value]
    --long-option[ value]
    -short-option[ value]

    # And special keywords (of which there is only one)
    list

        Actual Example Config File
        ==========================
        # set up nice colors for a white terminal bkgnd...

        # bold blue
        --color-line-number=1;34
        # black with grey bkgnd
        --color-match=30;47
        # green
        --color-path=32

If the keyword "list" is included  in a config file, ag dumps the  contents of
argv[]  on stdout.  This is useful for debugging config file errors that cause
ag to output a usage message and then silently exit.

Ag reads configuration information from a number of possible locations,
in the following order (first file found is used, all others ignored):

    1.   Path specified in $AGRC_PATH
    2.   $XDG_CONFIG_HOME/agrc
    3.   ~/.agrc
    4.   /usr/local/etc/agrc
    5.   /etc/agrc
@trinitronx trinitronx added the enhancement New feature or request label Jun 13, 2023
@trinitronx trinitronx self-assigned this Jun 13, 2023
@trinitronx trinitronx merged commit 9e3017a into master Jun 13, 2023
@trinitronx trinitronx deleted the config-file-support-v2-ported-merge branch June 13, 2023 02:46
@trinitronx trinitronx restored the config-file-support-v2-ported-merge branch June 13, 2023 02:46
trinitronx added a commit to trinitronx/dotfiles that referenced this pull request Aug 30, 2024
@trinitronx trinitronx deleted the config-file-support-v2-ported-merge branch August 30, 2024 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants