Skip to content

Commit b7ffaa9

Browse files
authored
Merge pull request #122 from jamessimas/master
Adds Bash completions file
2 parents 83887c4 + 552a5f9 commit b7ffaa9

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

completions/gron.bash

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
3+
# Bash shell commandline completions for gron.
4+
#
5+
# Copy the contents of this file into your ~/.bashrc file or whatever
6+
# file you use for Bash completions.
7+
#
8+
# Example: cat ./completions/gron.bash >> ~/.bashrc
9+
10+
function _gron_completion {
11+
local AVAILABLE_COMMANDS="--colorize --insecure --json --monochrome --no-sort --stream --ungron --values --version"
12+
COMPREPLY=()
13+
14+
local CURRENT_WORD=${COMP_WORDS[COMP_CWORD]}
15+
COMPREPLY=($(compgen -W "$AVAILABLE_COMMANDS" -- "$CURRENT_WORD"))
16+
}
17+
18+
complete -F _gron_completion gron

0 commit comments

Comments
 (0)