|
Lines 107-121
Link Here
|
| 107 |
# |
107 |
# |
| 108 |
case "${DONT_CHECK_PAGER}" in |
108 |
case "${DONT_CHECK_PAGER}" in |
| 109 |
'') |
109 |
'') |
| 110 |
if [ -n "${PAGER}" -a ! -x "${PAGER%% *}" ]; then |
110 |
if ! type "${PAGER%% *}" >/dev/null && [ -n "${PAGER}" ]; then |
| 111 |
echo " *** Your PAGER environment variable specifies '${PAGER}', but" |
111 |
echo " *** Your PAGER environment variable specifies '${PAGER}', but" |
| 112 |
echo " I cannot execute it. In general it is good practice to" |
112 |
echo " due to the limited PATH that I use for security reasons," |
| 113 |
echo " specify the full path for environment variables like" |
113 |
echo " I cannot execute it. So, what would you like to do?" |
| 114 |
echo " PAGER and EDITOR. Meanwhile, what would you like to do?" |
|
|
| 115 |
echo '' |
114 |
echo '' |
| 116 |
echo " Use 'e' to exit mergemaster and fix your PAGER variable" |
115 |
echo " Use 'e' to exit mergemaster and fix your PAGER variable" |
| 117 |
if [ -x /usr/local/bin/less ]; then |
116 |
if [ -x /usr/bin/less -o -x /usr/local/bin/less ]; then |
| 118 |
echo " Use 'l' to set PAGER to /usr/local/bin/less for this run" |
117 |
echo " Use 'l' to set PAGER to 'less' for this run" |
| 119 |
fi |
118 |
fi |
| 120 |
echo " Use 'm' to use plain old 'more' as your PAGER for this run" |
119 |
echo " Use 'm' to use plain old 'more' as your PAGER for this run" |
| 121 |
echo '' |
120 |
echo '' |
|
Lines 127-133
Link Here
|
| 127 |
exit 0 |
126 |
exit 0 |
| 128 |
;; |
127 |
;; |
| 129 |
[lL]*) |
128 |
[lL]*) |
| 130 |
PAGER=/usr/local/bin/less |
129 |
if [ -x /usr/bin/less ]; then |
|
|
130 |
PAGER=/usr/bin/less |
| 131 |
elif [ -x /usr/local/bin/less ]; then |
| 132 |
PAGER=/usr/local/bin/less |
| 133 |
else |
| 134 |
echo '' |
| 135 |
echo " *** Fatal Error:" |
| 136 |
echo " You asked to use 'less' as your pager, but I can't" |
| 137 |
echo " find it in /usr/bin or /usr/local/bin" |
| 138 |
exit 1 |
| 139 |
fi |
| 131 |
;; |
140 |
;; |
| 132 |
*) |
141 |
*) |
| 133 |
PAGER=more |
142 |
PAGER=more |