SHA256
1
0
forked from pool/tcsh

complete for manual pages

OBS-URL: https://build.opensuse.org/package/show/shells/tcsh?expand=0&rev=162
This commit is contained in:
Dr. Werner Fink 2023-10-12 11:12:23 +00:00 committed by Git OBS Bridge
parent 8ce31caa77
commit c082e115ed
2 changed files with 14 additions and 4 deletions

View File

@ -10,6 +10,7 @@
# 1999/06/28: <werner@suse.de> resort to the order to fit complete.tcsh
# found in tcsh-6.08.05, add the mh completes.
#
set _man_sections=(`\ls -1dfUA ${_manpath}*|sed s%/.\*/man%%|sort -u`)
set autolist=ambiguous
set noglob
#
@ -703,11 +704,14 @@ skip_mh:
n@-u@T:$_maildir@ n/-f/f/ n/*/u/
endif
complete man 'n@[0-9n]@`\ls -1fUA ${_manpath}$:-1/|&\sed \\%.\*:%d\;s%\\.$:-1.\*\$%%|\sort -u`@' \
alias _list_man_pages \
'find ${_manpath:h} \( -type f -o -type l \) -printf "%f\n"|&sed -r "\%find:.*:%d;s%([^.]+).([^ ]*?)%\1%g"|sort -u'
complete man 'n@[0-9n]{,p,mp}@`\ls -1fUA ${_manpath}$:-1/|&sed \\%.\*:%d\;s%\\.$:-1.\*\$%%|sort -u`@' \
c@-@"(- f k M P s S t)"@ n@-f@c@ n@-k@x:'<keyword>'@ n/-l/f/ C@./*@f@ n@-[MP]@d@ \
'N@-[MP]@`\ls -1 $:-1/man? |&\sed -n s%\\..\\+\$%%p`@' \
'n@-[sS]@`\ls -1 ${_manpath:h}|&\sed -n \\%/.\*:%d\;s%man%%p|\sort -u`@' \
'n@*@`\find ${_manpath:h} \( -type f -o -type l \) -printf "%f\n"|&\sed -r "\%find:.*:%d;s%([^.]+).([^ ]*?)%\1%g"|\sort -u`@'
'N@-[MP]@`\ls -1 $:-1/man? |&sed -n s%\\..\\+\$%%p`@' \
'n@-[sS]@`\ls -1 ${_manpath:h}|&sed -n \\%/.\*:%d\;s%man%%p|sort -u`@' \
'p@1@`echo ${_man_sections};eval _list_man_pages`@' \
'n@*@`eval _list_man_pages`@'
complete ps c/-t/x:'<tty>'/ c/-/"(a c C e g k l S t u v w x)"/ \
n/-k/x:'<kernel>'/ N/-k/x:'<core_file>'/ n/*/x:'<PID>'/
complete compress c/-/"(c f v b)"/ n/-b/x:'<max_bits>'/ n/*/f:^*.Z/

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Oct 12 11:10:59 UTC 2023 - Dr. Werner Fink <werner@suse.de>
- Try to make complete for command man faster and support all
separate manual page sections
-------------------------------------------------------------------
Mon Oct 9 08:08:30 UTC 2023 - Dr. Werner Fink <werner@suse.de>