-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
And bump copyright
- Loading branch information
Showing
2 changed files
with
16 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# -*- shell-script -*- | ||
# debugger command options processing. The bane of programming. | ||
# | ||
# Copyright (C) 2008-2012, 2014-2019, 2021, 2023 | ||
# Copyright (C) 2008-2012, 2014-2019, 2021, 2023-2024 | ||
# Rocky Bernstein <[email protected]> | ||
# | ||
# This program is free software; you can redistribute it and/or | ||
|
@@ -95,9 +95,11 @@ if ( pygmentize --version || pygmentize -V ) 2>/dev/null 1>/dev/null ; then | |
fi | ||
|
||
typeset -ix _Dbg_working_term_highlight | ||
typeset -x _Dbg_pygments_styles='' | ||
|
||
if "${_Dbg_libdir}/lib/term-highlight.py" -V 2>/dev/null 1>/dev/null ; then | ||
_Dbg_working_term_highlight=1 | ||
_Dbg_pygments_styles=$("${_Dbg_libdir}/lib/term-highlight.py" -L) | ||
else | ||
_Dbg_working_term_highlight=0 | ||
fi | ||
|
@@ -133,7 +135,7 @@ _Dbg_parse_options() { | |
typeset -i _Dbg_highlight_enabled=1 | ||
typeset OPTLARG OPTLERR OPTLPENDING opt | ||
|
||
while getopts_long A:Bc:x:hL:nqTt:Yy:VX opt \ | ||
while getopts_long A:Bc:x:hL:nqS:T:t:Yy:VX opt \ | ||
annotate required_argument \ | ||
basename no_argument \ | ||
command required_argument \ | ||
|
@@ -147,6 +149,7 @@ _Dbg_parse_options() { | |
no-init no_argument \ | ||
nx no_argument \ | ||
quiet no_argument \ | ||
style required_argument \ | ||
tempdir required_argument \ | ||
tty required_argument \ | ||
terminal required_argument \ | ||
|
@@ -178,7 +181,7 @@ _Dbg_parse_options() { | |
esac | ||
|
||
if (( ! _Dbg_have_working_pygmentize )) ; then | ||
printf "Can't run pygmentize. --highlight forced off" >&2 | ||
printf "Can't run pygmentize. --highlight forced off." >&2 | ||
_Dbg_highlight_enabled=0 | ||
_Dbg_set_highlight='' | ||
fi | ||
|
@@ -187,9 +190,7 @@ _Dbg_parse_options() { | |
_Dbg_highlight_enabled=0 | ||
_Dbg_set_highlight='' ;; | ||
init-file ) | ||
set -x | ||
_Dbg_o_init_files+="$OPTLARG" | ||
set +x | ||
;; | ||
L | library ) ;; | ||
V | version ) | ||
|
@@ -198,6 +199,15 @@ _Dbg_parse_options() { | |
_Dbg_o_nx=1 ;; | ||
q | quiet ) | ||
_Dbg_o_quiet=1 ;; | ||
S | style ) | ||
if (( ! _Dbg_have_working_pygmentize )) ; then | ||
printf "Can't run pygmentize. --style option ignored." >&2 | ||
elif [[ "${_Dbg_pygments_styles#*$OPTLARG}" != "$_Dbg_pygments_styles" ]] ; then | ||
_Dbg_set_style="$OPTLARG" | ||
else | ||
printf "Can't find style ${OPTLARG}; --style option ignored." >&1 | ||
fi | ||
;; | ||
tempdir) | ||
_Dbg_tmpdir=$OPTLARG ;; | ||
terminal | tty ) | ||
|
@@ -231,7 +241,7 @@ _Dbg_parse_options() { | |
[[ -n $_Dbg_release ]] ; then | ||
echo "$_Dbg_shell_name debugger, $_Dbg_debugger_name, release $_Dbg_release" | ||
printf ' | ||
Copyright 2002-2004, 2006-2012, 2014, 2016-2019, 2021, 2023 Rocky Bernstein | ||
Copyright 2002-2004, 2006-2012, 2014, 2016-2019, 2021, 2023-2024 Rocky Bernstein | ||
This is free software, covered by the GNU General Public License, and you are | ||
welcome to change it and/or distribute copies of it under certain conditions. | ||
|