mirror of
https://github.com/eth-p/bat-extras.git
synced 2024-12-12 09:10:45 +01:00
batgrep: Add short flag number parsing for context options
This commit is contained in:
parent
e4999a7ffb
commit
df5b237273
@ -53,10 +53,10 @@ while shiftopt; do
|
||||
-i | --ignore-case) OPT_CASE_SENSITIVITY="--ignore-case" ;;
|
||||
-s | --case-sensitive) OPT_CASE_SENSITIVITY="--case-sensitive" ;;
|
||||
-S | --smart-case) OPT_CASE_SENSITIVITY="--smart-case" ;;
|
||||
-A | --after-context) shiftval; OPT_CONTEXT_AFTER="$OPT_VAL" ;;
|
||||
-B | --before-context) shiftval; OPT_CONTEXT_BEFORE="$OPT_VAL" ;;
|
||||
|
||||
-C | --context)
|
||||
-A* | --after-context) shiftval; OPT_CONTEXT_AFTER="$OPT_VAL" ;;
|
||||
-B* | --before-context) shiftval; OPT_CONTEXT_BEFORE="$OPT_VAL" ;;
|
||||
-C* | --context)
|
||||
shiftval
|
||||
OPT_CONTEXT_BEFORE="$OPT_VAL"
|
||||
OPT_CONTEXT_AFTER="$OPT_VAL"
|
||||
|
Loading…
Reference in New Issue
Block a user