From b7f280ab597b07bbb22fb741589fe7754fc5cc0c Mon Sep 17 00:00:00 2001 From: Jun-ichi Takimoto Date: Thu, 29 Sep 2022 12:26:36 +0900 Subject: 50671: enable spell check in *.ztst by vim --- Util/ztst-syntax.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Util') diff --git a/Util/ztst-syntax.vim b/Util/ztst-syntax.vim index 639b9a4ec..42378e7a1 100644 --- a/Util/ztst-syntax.vim +++ b/Util/ztst-syntax.vim @@ -36,7 +36,7 @@ syn match ztstPayload /^\s.*/ contains=@zsh syn match ztstExitCode /^\d\+\|^-/ nextgroup=ztstFlags syn match ztstFlags /[.dDqf]*:/ contained nextgroup=ztstTestName contains=ztstColon syn match ztstColon /:.\@=/ contained -syn region ztstTestName start=// end=/$/ contained +syn region ztstTestName start=// end=/$/ contained contains=@Spell syn match ztstInputMarker /^<.\@=/ nextgroup=ztstInput syn region ztstInput start=// end=/$/ contained @@ -54,7 +54,7 @@ syn match ztstErrputLiteral /^[?].\@=/ nextgroup=ztstErrp syn region ztstErrput start=// end=/$/ contained syn match ztstFrequentExplanationMarker /^F:/ nextgroup=ztstFrequentExplanation -syn region ztstFrequentExplanation start=// end=/$/ contained +syn region ztstFrequentExplanation start=// end=/$/ contained contains=@Spell syn match ztstDirective /^%.*/ -- cgit v1.2.3 From dbefe08f3ef9921c2e02e481659f3caa5e8aabe9 Mon Sep 17 00:00:00 2001 From: Matt Koscica Date: Fri, 18 Feb 2022 09:02:11 +0100 Subject: github #87 (tweaked): update options tmux 3.4 Import completion updates from tmux.git, the revision used was c67abcf8182b, and the updates were generated by Util/check-tmux-state. check-tmux-state: changes to output parsing + variable declaration parsing of `tmux show-options` is slightly more idiomatic (thanks to @phy1729 for the syntax), and it now also ignores user-specified options (which are prefixed with an @ symbol). the lines defining and declaring supported_server_options were also swapped to the correct order - `typeset` was being called after supported_server_options was populated, contrary to all the other supported_*/available_* arrays used in the same area of the file. --- ChangeLog | 3 +++ Completion/Unix/Command/_tmux | 53 ++++++++++++++++++++++++++++++++++++++----- Util/check-tmux-state | 14 ++++++------ 3 files changed, 57 insertions(+), 13 deletions(-) mode change 100644 => 100755 Util/check-tmux-state (limited to 'Util') diff --git a/ChangeLog b/ChangeLog index 7d4b0534a..c4a88f053 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2022-11-17 Oliver Kiddle + * github #87: Matt Koscica: Completion/Unix/Command/_tmux: + update options tmux 3.4 + * github #95: Wu Zhenyu: Completion/Unix/Command/_mutt: Add completions for neomutt diff --git a/Completion/Unix/Command/_tmux b/Completion/Unix/Command/_tmux index 844af58fc..c8ed24b26 100644 --- a/Completion/Unix/Command/_tmux +++ b/Completion/Unix/Command/_tmux @@ -130,6 +130,8 @@ _tmux_aliasmap=( popup display-popup # buffers + clearphist clear-prompt-history + showphist show-prompt-history clearhist clear-history deleteb delete-buffer lsb list-buffers @@ -267,6 +269,11 @@ _tmux-clear-history() { _arguments '-t+[specify target pane]:pane:__tmux-panes' } +_tmux-clear-prompt-history() { + [[ -n ${tmux_describe} ]] && print "remove history of values for command line prompts" && return + _arguments '-T+[specify prompt type]:prompt type:(command search target window-target)' +} + _tmux-clock-mode() { [[ -n ${tmux_describe} ]] && print "enter clock mode" && return _arguments '-t+[specify target pane]:pane:__tmux-panes' @@ -282,8 +289,7 @@ _tmux-command-prompt() { '-I+[specify list of initial inputs]:initial-text (comma-separated list)' \ '-p+[specify list of prompts]:prompts (comma-separated list)' \ '-t+[specify target client]:client:__tmux-clients' \ - '(-W)-T[prompt is for a target - tab complete as appropriate]' \ - '(-T)-W[prompt is for a window - tab complete as appropriate]' \ + '-T+[specify prompt type]:prompt type:(command search target window-target)' \ '*:::template:= _tmux' } @@ -388,13 +394,19 @@ _tmux-display-panes() { _tmux-display-popup() { [[ -n ${tmux_describe} ]] && print "display a popup box over a pane" && return _arguments -s \ + "-B[don't surround the popup by a border]" \ '-C[close any popup on the client]' \ '-c+[specify target client]:client:__tmux-clients' \ '-d+[specify working directory for the command]:directory:_directories' \ + '*-e[specify environment variable]:environment variable:_parameters -g "*export*" -qS=' \ '-E[close the popup when the command exits]' \ + '(-E)-EE[only close the popup when the command exits successfully]' \ '-w+[specify width]:width' \ '-h+[specify height]:height' \ + '-s+[specify the style for the popup]:style:__tmux-style' \ + '-S+[specify the style for the popup border]:style:__tmux-style' \ '-t+[specify target pane]:pane:__tmux-panes' \ + '-T+[specify popup title (supports formats)]:format:__tmux-formats' \ '-x+[specify horizontal position]:position' \ '-y+[specify vertical position]:position' \ ':shell command:_cmdstring' @@ -865,6 +877,10 @@ _tmux-send-prefix() { '-t+[specify target pane]:pane:__tmux-panes' } +# NOTE: this is actually an alias for "show-messages -JT", but until the +# aliasmap system in check-tmux-state can properly handle aliases which are +# more complex than a single word, it's best to leave this here. + _tmux-server-info() { [[ -n ${tmux_describe} ]] && print "show server information" && return __tmux-nothing-else @@ -1041,6 +1057,11 @@ _tmux-show-options() { return ret } +_tmux-show-prompt-history() { + [[ -n ${tmux_describe} ]] && print "show status prompt history" && return + _arguments '-T+[specify prompt type]:prompt type:(command search target window-target)' +} + _tmux-show-window-options() { [[ -n ${tmux_describe} ]] && print "show window options" && return local curcontext="$curcontext" state line ret=1 @@ -1530,7 +1551,6 @@ function __tmux-option-guard() { 'status-right-style:__tmux-style' 'status-style:__tmux-style' 'update-environment:MSG:string listing env. variables' - 'user-keys:MSG:key' 'visual-activity:DESC:on off' 'visual-bell:DESC:on off' 'visual-silence:DESC:on off' @@ -1549,6 +1569,7 @@ function __tmux-option-guard() { 'message-limit:'${int_guard} 'set-clipboard:DESC:on off' 'terminal-overrides:MSG:overrides string' + 'user-keys:MSG:key' ) else options=( @@ -1643,6 +1664,8 @@ function __tmux-session-options() { 'set-titles-string:format used by set-titles' 'silence-action:set action on window silence when monitor-silence is on' 'status:show or hide the status bar' + 'status-bg:set the background style used by the status bar' + 'status-fg:set the foreground style used by the status bar' 'status-format:specify the format to be used for each line of the status line' 'status-interval:interval (in seconds) for status bar updates' 'status-justify:position of the window list in status bar' @@ -1656,7 +1679,6 @@ function __tmux-session-options() { 'status-right-style:style of right part of status line' 'status-style:style status line' "update-environment:list of variables to be copied to a session's environment" - 'user-keys:set list of user-defined key escape sequences' 'visual-activity:display status line messages upon activity' 'visual-bell:use visual bell instead of audible' 'visual-silence:print a message if monitor-silence is on' @@ -1701,20 +1723,28 @@ function __tmux-panes() { fi } + function __tmux-server-options() { local -a tmux_server_options tmux_server_options=( + 'backspace:set key sent by tmux for backspace' 'buffer-limit:number of buffers kept per session' 'command-alias:custom command aliases' + 'copy-command:specify the default command when "copy-pipe" is called without arguments' 'default-terminal:default terminal definition string' 'escape-time:set timeout to detect single escape characters (in msecs)' + 'editor:specify the command used when tmux runs an editor' 'exit-unattached:make server exit if it has no attached clients' 'exit-empty:exit when there are no active sessions' + 'extended-keys:control whether tmux will send extended keys through to the terminal' 'focus-events:request focus events from terminal' 'history-file:tmux command history file name' 'message-limit:set size of message log per client' + 'prompt-history-limit:set the number of history items to save in the history file' 'set-clipboard:use esc sequences to set terminal clipboard' + 'terminal-features:set terminal features not detected by terminfo' 'terminal-overrides:override terminal descriptions' + 'user-keys:set list of user-defined key escape sequences' ) _describe -t tmux-server-options 'tmux server option' tmux_server_options } @@ -1770,10 +1800,15 @@ function __tmux-window-options() { 'aggressive-resize:aggressively resize windows' 'allow-rename:allow programs to change window titles' 'alternate-screen:allow alternate screen feature to be used' - 'automatic-rename:attempt to automatically rename windows' 'automatic-rename-format:format for automatic renames' + 'automatic-rename:attempt to automatically rename windows' 'clock-mode-colour:set clock colour' 'clock-mode-style:set clock hour format (12/24)' + 'copy-mode-current-match-style:set the style of the current search match in copy mode' + 'copy-mode-mark-style:set the style of the line containing the mark in copy mode' + 'copy-mode-match-style:set the style of search matches in copy mode' + 'cursor-colour:set the colour of the cursor' + 'cursor-style:set the style of the cursor' 'main-pane-height:set height for main-* layouts' 'main-pane-width:set width for main-* layouts' 'mode-keys:mode to use in copy and choice modes (vi/emacs)' @@ -1786,11 +1821,18 @@ function __tmux-window-options() { 'pane-active-border-style:style of border of active pane' 'pane-base-index:integer at which to start indexing panes' 'pane-border-format:set pane border format string' + 'pane-border-indicators:set the indicator style for the active pane in a two pane split' + 'pane-border-lines:set the type of characters used for drawing pane borders' 'pane-border-status:turn border status off or set its position' 'pane-border-style:style of border pane' + "pane-colours:an array used to configure tmux's colour palette" + 'popup-border-lines:set the type of line used to draw popup borders' + "popup-border-style:set the style for the popup's border" + 'popup-style:set the popup style' "remain-on-exit:don't destroy windows after the program exits" 'synchronize-panes:send input to all panes of a window' 'window-active-style:style of active window' + 'window-size:indicate how to automatically size windows' 'window-status-activity-style:style of status bar activity tag' 'window-status-bell-style:style of status bar bell tag' 'window-status-current-format:set status line format for active window' @@ -1799,7 +1841,6 @@ function __tmux-window-options() { 'window-status-last-style:style of last window in status bar' 'window-status-separator:separator drawn between windows in status line' 'window-status-style:general status bar style' - 'window-size:indicate how to automatically size windows' 'window-style:style of window' 'wrap-search:search wrap around at the end of a pane' 'xterm-keys:generate xterm-style function key sequences' diff --git a/Util/check-tmux-state b/Util/check-tmux-state old mode 100644 new mode 100755 index 2c6106203..d95e0c230 --- a/Util/check-tmux-state +++ b/Util/check-tmux-state @@ -74,18 +74,18 @@ available_aliases=( $( $tmux list-commands | # Gather information about options: typeset -a supported_session_options supported_session_options=( ${"${tmux_session_options[@]}"%%:*} ) -typeset -a available_session_options -available_session_options=( $( $tmux show-options -g | cut -f1 -d' ' ) ) +typeset -aU available_session_options +available_session_options=( ${${${(f)"$($tmux show-options -g)"}:#@*}%%(\[<->\])# *} ) -typeset -a available_server_options -supported_server_options=( ${"${tmux_server_options[@]}"%%:*} ) typeset -a supported_server_options -available_server_options=( $( $tmux show-options -s -g | cut -f1 -d' ' ) ) +supported_server_options=( ${"${tmux_server_options[@]}"%%:*} ) +typeset -aU available_server_options +available_server_options=( ${${${(f)"$($tmux show-options -s -g)"}:#@*}%%(\[<->\])# *} ) typeset -a supported_window_options supported_window_options=( ${"${tmux_window_options[@]}"%%:*} ) -typeset -a available_window_options -available_window_options=( $( $tmux show-options -w -g | cut -f1 -d' ' ) ) +typeset -aU available_window_options +available_window_options=( ${${${(f)"$($tmux show-options -w -g)"}:#@*}%%(\[<->\])# *} ) typeset -a supported available -- cgit v1.2.3 From b3980ecc583bfe34db46d47538448af1a953095e Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Sun, 26 Feb 2023 19:26:46 -0800 Subject: 51464: utility to interpret zsh.h constants --- ChangeLog | 2 + Util/printdefines | 601 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 603 insertions(+) create mode 100644 Util/printdefines (limited to 'Util') diff --git a/ChangeLog b/ChangeLog index 6ce0d9fbf..6ba598e4c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2023-02-26 Bart Schaefer + * 51464: Util/printdefines: utility to interpret zsh.h constants + * unposted: Doc/Zsh/restricted.yo: fix typo * 51460: Src/module.c: avoid crash on bad parameter autofeature diff --git a/Util/printdefines b/Util/printdefines new file mode 100644 index 000000000..30c06533b --- /dev/null +++ b/Util/printdefines @@ -0,0 +1,601 @@ +#!/bin/zsh -f +emulate -L zsh -o extendedglob + +zmodload zsh/param/private + +local -AHPrt jobstats=( + mapbase 16 + $((0x0001)) STAT_CHANGED # status changed and not reported + $((0x0002)) STAT_STOPPED # all procs stopped or exited + $((0x0004)) STAT_TIMED # job is being timed + $((0x0008)) STAT_DONE # job is done + $((0x0010)) STAT_LOCKED # shell is finished creating this job, + # may be deleted from job table + $((0x0020)) STAT_NOPRINT # job was killed internally, + # we don't want to show that + $((0x0040)) STAT_INUSE # this job entry is in use + $((0x0080)) STAT_SUPERJOB # job has a subjob + $((0x0100)) STAT_SUBJOB # job is a subjob + $((0x0200)) STAT_WASSUPER # was a super-job, sub-job needs to be + # deleted + $((0x0400)) STAT_CURSH # last command is in current shell + $((0x0800)) STAT_NOSTTY # the tty settings are not inherited + # from this job when it exits. + $((0x1000)) STAT_ATTACH # delay reattaching shell to tty + $((0x2000)) STAT_SUBLEADER # is super-job, but leader is sub-shell + + $((0x4000)) STAT_BUILTIN # job at tail of pipeline is a builtin + $((0x8000)) STAT_SUBJOB_ORPHANED + # STAT_SUBJOB with STAT_SUPERJOB exited + $((0x10000)) STAT_DISOWN # STAT_SUPERJOB with disown pending + +#-1 SP_RUNNING # fake status for jobs currently running +) +local -AHPrt paramflags=( + mapbase 2 + 0 PM_SCALAR # scalar + $((1<<0)) PM_ARRAY # array + $((1<<1)) PM_INTEGER # integer + $((1<<2)) PM_EFLOAT # double with %e output + $((1<<3)) PM_FFLOAT # double with %f output + $((1<<4)) PM_HASHED # association + + $((1<<5)) PM_LEFT # left justify, remove leading blanks + $((1<<6)) PM_RIGHT_B # right justify, fill with leading blanks + $((1<<7)) PM_RIGHT_Z # right justify, fill with leading zeros + $((1<<8)) PM_LOWER # all lower case + + $((1<<9)) PM_UPPER # all upper case +# $((1<<9)) PM_UNDEFINED # undefined (autoloaded) shell function + + $((1<<10)) PM_READONLY # readonly + $((1<<11)) PM_TAGGED # tagged + $((1<<12)) PM_EXPORTED # exported +# $((1<<12)) PM_ABSPATH_USED # (function): loaded using absolute path + + $((1<<13)) PM_UNIQUE # remove duplicates +# $((1<<13)) PM_UNALIASED # (function) do not expand aliases + + $((1<<14)) PM_HIDE # Special behaviour hidden by local +# $((1<<14)) PM_CUR_FPATH # (function): can use $fpath with filename + $((1<<15)) PM_HIDEVAL # Value not shown in `typeset' commands +# $((1<<15)) PM_WARNNESTED # (function): non-recursive WARNNESTEDVAR + $((1<<16)) PM_TIED # array tied to colon-path or v.v. +# $((1<<16)) PM_TAGGED_LOCAL # (function): non-recursive PM_TAGGED + +# Remaining flags do not correspond directly to command line switches + $((1<<17)) PM_DONTIMPORT_SUID # do not import if running setuid +# $((1<<17)) PM_LOADDIR # (function) filename gives load directory + $((1<<18)) PM_SINGLE # special can only have a single instance + $((1<<18)) PM_ANONYMOUS # (function) anonymous function + $((1<<19)) PM_LOCAL # this parameter will be made local +# $((1<<19)) PM_KSHSTORED # (function) stored in ksh form + $((1<<20)) PM_SPECIAL # special builtin parameter +# $((1<<20)) PM_ZSHSTORED # (function) stored in zsh form + $((1<<21)) PM_RO_BY_DESIGN # specials that can be made read-only by user +##$(((1<<20)|(1<<10)|(1<<21))) PM_READONLY_SPECIAL +# $((1<<22)) PM_DONTIMPORT # do not import this variable + $((1<<22)) PM_DECLARED # explicitly named with typeset + $((1<<23)) PM_RESTRICTED # cannot be changed in restricted mode + $((1<<24)) PM_UNSET # has null value +##$(((1<<22)|(1<<24))) PM_DEFAULTED + $((1<<25)) PM_REMOVABLE # special can be removed from paramtab + $((1<<26)) PM_AUTOLOAD # autoloaded from module + $((1<<27)) PM_NORESTORE # do not restore value of local special + $((1<<27)) PM_AUTOALL # autoload all features in module + $((1<<28)) PM_HASHELEM # is a hash-element + $((1<<29)) PM_NAMEDDIR # has a corresponding nameddirtab entry + $((1<<30)) PM_NAMEREF # pointer to a different parameter +) +local -AHPrt chartokens=( + mapbase integer + $((83)) Meta + $((84)) Pound + $((85)) String + $((86)) Hat + $((87)) Star + $((88)) Inpar + $((89)) Inparmath + $((90)) Outbrace + $((91)) Inbrack + $((92)) Outbrack + $((93)) Tick + $((94)) Inang + $((95)) Outang + $((96)) OutangProc + $((97)) Quest + $((98)) Tilde + $((99)) Qtick + $((a0)) Bnullkeep + $((a1)) Nularg + $((a2)) Marker +) +local -AHPrt fdtabletype=( + mapbase integer + $((0)) FDT_UNUSED + $((1)) FDT_INTERNAL + $((2)) FDT_EXTERNAL + $((3)) FDT_MODULE + $((4)) FDT_XTRACE + $((5)) FDT_FLOCK + $((6)) FDT_FLOCK_EXEC + $((7)) FDT_PROC_SUBST +) +local -AHPrt inputstates=( + mapbase 2 + $((1<<0)) INP_FREE + $((1<<1)) INP_ALIAS + $((1<<2)) INP_HIST + $((1<<3)) INP_CONT + $((1<<4)) INP_ALCONT + $((1<<5)) INP_HISTCONT +) +local -AHPrt metafytypes=( + mapbase integer + $((0)) META_REALLOC + $((1)) META_USEHEAP + $((2)) META_STATIC + $((3)) META_DUP + $((4)) META_ALLOC + $((5)) META_NOALLOC + $((6)) META_HEAPDUP + $((7)) META_HREALLOC +) +local -AHPrt jobtypes=( + mapbase 2 + $((1<<0)) Z_TIMED # pipeline is being timed + $((1<<1)) Z_SYNC # run this sublist synchronously (;) + $((1<<2)) Z_ASYNC # run this sublist asynchronously (&) + $((1<<3)) Z_DISOWN # run this sublist without job control (&|) + $((1<<4)) Z_END + $((1<<5)) Z_SIMPLE +) +local -AHPrt condtypes=( + mapbase integer + $((0)) COND_NOT + $((1)) COND_AND + $((2)) COND_OR + $((3)) COND_STREQ + $((4)) COND_STRDEQ + $((5)) COND_STRNEQ + $((6)) COND_STRLT + $((7)) COND_STRGTR + $((8)) COND_NT + $((9)) COND_OT + $((10)) COND_EF + $((11)) COND_EQ + $((12)) COND_NE + $((13)) COND_LT + $((14)) COND_GT + $((15)) COND_LE + $((16)) COND_GE + $((17)) COND_REGEX + $((18)) COND_MOD + $((19)) COND_MODI +) +local -AHPrt wordcodes=( + mapbase integer + $((1)) WC_LIST + $((2)) WC_SUBLIST + $((3)) WC_PIPE + $((4)) WC_REDIR + $((5)) WC_ASSIGN + $((6)) WC_SIMPLE + $((7)) WC_TYPESET + $((8)) WC_SUBSH + $((9)) WC_CURSH + $((10)) WC_TIMED + $((11)) WC_FUNCDEF + $((12)) WC_FOR + $((13)) WC_SELECT + $((14)) WC_WHILE + $((15)) WC_REPEAT + $((16)) WC_CASE + $((17)) WC_IF + $((18)) WC_COND + $((19)) WC_ARITH + $((20)) WC_AUTOFN + $((21)) WC_TRY + $((22)) WC_COUNT +) +local -AHPrt wcsublists=( + mapbase 10 + $((0)) WC_SUBLIST_END + $((1)) WC_SUBLIST_AND + $((2)) WC_SUBLIST_OR + $((4)) WC_SUBLIST_COPROC + $((8)) WC_SUBLIST_NOT + $((16)) WC_SUBLIST_SIMPLE +) +local -AHPrt eprogstates=( + mapbase 10 + $((1)) EF_REAL + $((2)) EF_HEAP + $((4)) EF_MAP + $((8)) EF_RUN +) +local -AHPrt builtintypes=( + mapbase 2 + $((1<<1)) BINF_PLUSOPTS # +xyz legal + $((1<<2)) BINF_PRINTOPTS + $((1<<3)) BINF_ADDED # is in the builtins hash table + $((1<<5)) BINF_PREFIX + $((1<<6)) BINF_DASH + $((1<<7)) BINF_BUILTIN + $((1<<8)) BINF_COMMAND + $((1<<9)) BINF_EXEC + $((1<<10)) BINF_NOGLOB + $((1<<11)) BINF_PSPECIAL + $((1<<12)) BINF_SKIPINVALID # Treat invalid option as argument + $((1<<13)) BINF_KEEPNUM # `[-+]NUM' can be an option + $((1<<14)) BINF_SKIPDASH # Treat `-' as argument (maybe `+') + $((1<<15)) BINF_DASHDASHVALID # Handle `--' even if SKIPINVALD + $((1<<16)) BINF_CLEARENV # new process started with cleared env + $((1<<17)) BINF_AUTOALL # autoload all features at once + $((1<<18)) BINF_HANDLES_OPTS + $((1<<19)) BINF_ASSIGN +) +local -AHPrt patflags=( + mapbase 16 + $((0x0000)) PAT_HEAPDUP # Dummy flag for default behavior + $((0x0001)) PAT_FILE # Pattern is a file name + $((0x0002)) PAT_FILET # Pattern is top level file, affects ~ + $((0x0004)) PAT_ANY # Match anything (cheap "*") + $((0x0008)) PAT_NOANCH # Not anchored at end + $((0x0010)) PAT_NOGLD # Don't glob dots + $((0x0020)) PAT_PURES # Pattern is a pure string: set internally + $((0x0040)) PAT_STATIC # Don't copy pattern to heap as per default + $((0x0080)) PAT_SCAN # Scanning, so don't try must-match test + $((0x0200)) PAT_NOTSTART # Start of string is not real start + $((0x0400)) PAT_NOTEND # End of string is not real end + $((0x0800)) PAT_HAS_EXCLUDP # (internal): top-level path1~path2. +) +local -AHPrt patclasses=( + mapbase integer + $((1)) PP_FIRST + $((1)) PP_ALPHA + $((2)) PP_ALNUM + $((3)) PP_ASCII + $((4)) PP_BLANK + $((5)) PP_CNTRL + $((6)) PP_DIGIT + $((7)) PP_GRAPH + $((8)) PP_LOWER + $((9)) PP_PRINT + $((10)) PP_PUNCT + $((11)) PP_SPACE + $((12)) PP_UPPER + $((13)) PP_XDIGIT + $((14)) PP_IDENT + $((15)) PP_IFS + $((16)) PP_IFSSPACE + $((17)) PP_WORD + $((18)) PP_INCOMPLETE + $((19)) PP_INVALID + $((19)) PP_LAST + $((20)) PP_UNKWN + $((21)) PP_RANGE +) +local -AHPrt globmodifiers=( + mapbase 16 + $((0x0100)) GF_LCMATCHUC + $((0x0200)) GF_IGNCASE + $((0x0400)) GF_BACKREF + $((0x0800)) GF_MATCHREF + $((0x1000)) GF_MULTIBYTE # Use multibyte if supported by build +) +local -AHPrt scanparamflags=( + mapbase 2 + $((1<<0)) SCANPM_WANTVALS # Return value includes hash values + $((1<<1)) SCANPM_WANTKEYS # Return value includes hash keys + $((1<<2)) SCANPM_WANTINDEX # Return value includes array index + $((1<<3)) SCANPM_MATCHKEY # Subscript matched against key + $((1<<4)) SCANPM_MATCHVAL # Subscript matched against value + $((1<<5)) SCANPM_MATCHMANY # Subscript matched repeatedly, return all + $((1<<6)) SCANPM_ASSIGNING # Assigning whole array/hash + $((1<<7)) SCANPM_KEYMATCH # keys of hash treated as patterns + $((1<<8)) SCANPM_DQUOTED # substitution was double-quoted + $((1<<9)) SCANPM_ARRONLY # value is array but we don't + $((1<<10)) SCANPM_CHECKING # Check if set, no need to create + $((1<<11)) SCANPM_NOEXEC # No command substitutions, etc. +) +local -AHPrt substmodifiers=( + mapbase 16 + $((0x0001)) SUB_END # match end instead of beginning, % or %% + $((0x0002)) SUB_LONG # % or # doubled, get longest match + $((0x0004)) SUB_SUBSTR # match a substring + $((0x0008)) SUB_MATCH # include the matched portion + $((0x0010)) SUB_REST # include the unmatched portion + $((0x0020)) SUB_BIND # index of beginning of string + $((0x0040)) SUB_EIND # index of end of string + $((0x0080)) SUB_LEN # length of match + $((0x0100)) SUB_ALL # match complete string + $((0x0200)) SUB_GLOBAL # global substitution ${..//all/these} + $((0x0400)) SUB_DOSUBST # replacement string needs substituting + $((0x4000)) SUB_EGLOB # use extended globbing in patterns +) +local -AHPrt printnodeflags=( + mapbase 2 + $((1<<0)) PRINT_NAMEONLY + $((1<<1)) PRINT_TYPE + $((1<<2)) PRINT_LIST + $((1<<3)) PRINT_KV_PAIR + $((1<<4)) PRINT_INCLUDEVALUE + $((1<<5)) PRINT_TYPESET + $((1<<6)) PRINT_LINE + $((1<<7)) PRINT_POSIX_EXPORT + $((1<<8)) PRINT_POSIX_READONLY + $((1<<7)) PRINT_WHENCE_CSH + $((1<<8)) PRINT_WHENCE_VERBOSE + $((1<<9)) PRINT_WHENCE_SIMPLE + $((1<<10)) PRINT_WHENCE_FUNCDEF + $((1<<11)) PRINT_WHENCE_WORD +) +local -AHPrt savehistflags=( + mapbase 16 + $((0x00000001)) HIST_MAKEUNIQUE # Kill this new entry if not unique + $((0x00000002)) HIST_OLD # Command is already written to disk + $((0x00000004)) HIST_READ # Command was read back from disk + $((0x00000008)) HIST_DUP # Command duplicates a later line + $((0x00000010)) HIST_FOREIGN # Command came from another shell + $((0x00000020)) HIST_TMPSTORE # Kill when user enters another cmd + $((0x00000040)) HIST_NOWRITE # Keep internally but don't write +) +local -AHPrt histflags=( + mapbase 10 + $((1)) HISTFLAG_DONE + $((2)) HISTFLAG_NOEXEC + $((4)) HISTFLAG_RECALL + $((8)) HISTFLAG_SETTY +) +local -AHPrt histfileflags=( + mapbase 16 + $((0x0001)) HFILE_APPEND + $((0x0002)) HFILE_SKIPOLD + $((0x0004)) HFILE_SKIPDUPS + $((0x0008)) HFILE_SKIPFOREIGN + $((0x0010)) HFILE_FAST + $((0x0020)) HFILE_NO_REWRITE + $((0x8000)) HFILE_USE_OPTIONS +) +local -AHPrt modloadflags=( + mapbase 2 + $((1<<0)) MOD_BUSY + $((1<<1)) MOD_UNLOAD + $((1<<2)) MOD_SETUP + $((1<<3)) MOD_LINKED + $((1<<4)) MOD_INIT_S + $((1<<5)) MOD_INIT_B + $((1<<6)) MOD_ALIAS +) +local -AHPrt modcondflags=( + mapbase 10 + $((1)) CONDF_INFIX + $((2)) CONDF_ADDED + $((4)) CONDF_AUTOALL +) +local -AHPrt mathfunctypes=( + mapbase 10 + $((1)) MFF_STR + $((2)) MFF_ADDED + $((4)) MFF_USERFUNC + $((8)) MFF_AUTOALL +) +local -AHPrt lexflags=( + mapbase 16 + $((0x0001)) LEXFLAGS_ACTIVE + $((0x0002)) LEXFLAGS_ZLE + $((0x0004)) LEXFLAGS_COMMENTS_KEEP + $((0x0008)) LEXFLAGS_COMMENTS_STRIP + $((0x0010)) LEXFLAGS_NEWLINE +) +local -AHPrt lexstates=( + mapbase integer + $((0)) IN_NOTHING + $((1)) IN_CMD + $((2)) IN_MATH + $((3)) IN_COND + $((4)) IN_ENV + $((5)) IN_PAR +) +local -AHPrt emulations=( + mapbase 2 + $((1<<1)) EMULATE_CSH # C shell + $((1<<2)) EMULATE_KSH # Korn shell + $((1<<3)) EMULATE_SH # Bourne shell + $((1<<4)) EMULATE_ZSH # `native' mode +) +local -AHPrt terminaltypes=( + mapbase 16 + $((0x01)) TERM_BAD # terminal has extremely basic capabilities + $((0x02)) TERM_UNKNOWN # unknown terminal type + $((0x04)) TERM_NOUP # terminal has no up capability + $((0x08)) TERM_SHORT # terminal is < 3 lines high + $((0x10)) TERM_NARROW # terminal is < 3 columns wide +) +local -AHPrt termcapacts=( + mapbase integer + $((0)) TCCLEARSCREEN + $((1)) TCLEFT + $((2)) TCMULTLEFT + $((3)) TCRIGHT + $((4)) TCMULTRIGHT + $((5)) TCUP + $((6)) TCMULTUP + $((7)) TCDOWN + $((8)) TCMULTDOWN + $((9)) TCDEL + $((10)) TCMULTDEL + $((11)) TCINS + $((12)) TCMULTINS + $((13)) TCCLEAREOD + $((14)) TCCLEAREOL + $((15)) TCINSLINE + $((16)) TCDELLINE + $((17)) TCNEXTTAB + $((18)) TCBOLDFACEBEG + $((19)) TCFAINTBEG + $((20)) TCSTANDOUTBEG + $((21)) TCUNDERLINEBEG + $((22)) TCITALICSBEG + $((23)) TCALLATTRSOFF + $((24)) TCSTANDOUTEND + $((25)) TCUNDERLINEEND + $((26)) TCITALICSEND + $((27)) TCHORIZPOS + $((28)) TCUPCURSOR + $((29)) TCDOWNCURSOR + $((30)) TCLEFTCURSOR + $((31)) TCRIGHTCURSOR + $((32)) TCSAVECURSOR + $((33)) TCRESTRCURSOR + $((34)) TCBACKSPACE + $((35)) TCFGCOLOUR + $((36)) TCBGCOLOUR +) +local -AHPrt cmdstackstates=( + mapbase integer + $((0)) CS_FOR + $((1)) CS_WHILE + $((2)) CS_REPEAT + $((3)) CS_SELECT + $((4)) CS_UNTIL + $((5)) CS_IF + $((6)) CS_IFTHEN + $((7)) CS_ELSE + $((8)) CS_ELIF + $((9)) CS_MATH + $((10)) CS_COND + $((11)) CS_CMDOR + $((12)) CS_CMDAND + $((13)) CS_PIPE + $((14)) CS_ERRPIPE + $((15)) CS_FOREACH + $((16)) CS_CASE + $((17)) CS_FUNCDEF + $((18)) CS_SUBSH + $((19)) CS_CURSH + $((20)) CS_ARRAY + $((21)) CS_QUOTE + $((22)) CS_DQUOTE + $((23)) CS_BQUOTE + $((24)) CS_CMDSUBST + $((25)) CS_MATHSUBST + $((26)) CS_ELIFTHEN + $((27)) CS_HEREDOC + $((28)) CS_HEREDOCD + $((29)) CS_BRACE + $((30)) CS_BRACEPAR + $((31)) CS_ALWAYS + $((32)) CS_COUNT +) + +zmodload zsh/parameter +local seek=${parameters[paramflags]} + +if [[ $1 = (|-)-h(|elp) ]] +then + print -u2 Usage: + print -u2 " printdefines [ category ] [ name | value ]" + shift +fi + +if [[ -z $1 ]] +then + print -u2 "Choose category:" + print -u2 -aC3 -- ${(ok)parameters[(R)$seek]} + return 1 +fi + +local -a outflag + +if [[ -z $parameters[$1] || $parameters[$1] != $seek ]] +then + local -n scan + for scan in ${(k)parameters[(R)$seek]} + do + if [[ -n ${scan[(R)$1]} ]] + then + local -a hits + set -A hits ${${(nk)scan[(R)$~1]}:#mapbase} + integer -i ${scan[mapbase]/integer/10} w=${hits[-1]} + integer x=${#${scan[mapbase]/integer/}}+2 + while (($#hits)) + do + if [[ $scan[mapbase] = 2 ]] + then + w=${hits[1]} + local +i flag + if (( w )) + then + printf -v flag '1<<%d\t%s' $((${#w} - x)) $hits[1] + else + printf -v flag '0<<0\t%s' $hits[1] + fi + else + integer -i ${scan[mapbase]/integer/10} -Z ${#w} flag=${hits[1]} + fi + outflag+=($scan[$hits[1]] $flag ) + shift hits + done + local +n scan # ${!scan} + print -aC2 -- "--- $scan" --- $outflag + local -n scan + outflag=() + fi + done + return 0 +fi + +local -n ref=$1 + +if [[ $2 = <-> ]] +then + integer i=$2 + integer flag + if [[ $ref[mapbase] = integer ]] + then + if (( (i -= ${${ref[$2]:+$2}:-0}) == 0 )) + then + outflag=($ref[$2]) + fi + else + for flag in ${${(nk)ref}:#mapbase} + do + if (( i == flag || flag > 0 && (i & flag) == flag )) + then + # print $i $flag + outflag+=(${ref[$flag]}) + (( i -= flag )) + fi + done + fi + print $2 ${(j:|:)outflag} + if (( i )) + then + print Unknown $1: $i + fi +else + set -- ${${(nk)ref[(R)${~2:-*}]}:#mapbase} + integer -i ${ref[mapbase]/integer/10} w=${argv[-1]} + integer x=${#${ref[mapbase]/integer/}}+2 + while ((ARGC)) + do + if [[ $ref[mapbase] = 2 ]] + then + integer -i 2 w=$1 + local +i flag + if (( w )) + then + printf -v flag '1<<%d\t%s' $((${#w} - x)) $1 + else + printf -v flag '0<<0\t%s' $1 + fi + else + integer -i ${ref[mapbase]/integer/10} -Z ${#w} flag=$1 + fi + outflag+=($ref[$1] $flag ) + shift + done + print -aC2 -- $outflag +fi -- cgit v1.2.3 From 8424fe5e23dbae3983bdb03a91c49f467865fc33 Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Tue, 7 Mar 2023 17:57:06 -0800 Subject: 51534: update for recent changes in zsh.h --- ChangeLog | 4 ++++ Util/printdefines | 13 +++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'Util') diff --git a/ChangeLog b/ChangeLog index 91c0584b3..f15072191 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2023-03-07 Bart Schaefer + + * 51534: Util/printdefines: update for recent changes + 2023-03-06 Bart Schaefer * 51512: Doc/Zsh/mod_ksh93.yo: More about unsupported features diff --git a/Util/printdefines b/Util/printdefines index 30c06533b..c1306a19e 100644 --- a/Util/printdefines +++ b/Util/printdefines @@ -288,16 +288,18 @@ local -AHPrt scanparamflags=( mapbase 2 $((1<<0)) SCANPM_WANTVALS # Return value includes hash values $((1<<1)) SCANPM_WANTKEYS # Return value includes hash keys - $((1<<2)) SCANPM_WANTINDEX # Return value includes array index + $((1<<2)) SCANPM_WANTINDEX # Return value includes array index $((1<<3)) SCANPM_MATCHKEY # Subscript matched against key $((1<<4)) SCANPM_MATCHVAL # Subscript matched against value - $((1<<5)) SCANPM_MATCHMANY # Subscript matched repeatedly, return all - $((1<<6)) SCANPM_ASSIGNING # Assigning whole array/hash + $((1<<5)) SCANPM_MATCHMANY # Subscript matched repeatedly, return all + $((1<<6)) SCANPM_ASSIGNING # Assigning whole array/hash $((1<<7)) SCANPM_KEYMATCH # keys of hash treated as patterns $((1<<8)) SCANPM_DQUOTED # substitution was double-quoted $((1<<9)) SCANPM_ARRONLY # value is array but we don't $((1<<10)) SCANPM_CHECKING # Check if set, no need to create $((1<<11)) SCANPM_NOEXEC # No command substitutions, etc. + $((1<<12)) SCANPM_NONAMESPC # namespace syntax not allowed + $((1<<13)) SCANPM_NONAMEREF # named references are not followed ) local -AHPrt substmodifiers=( mapbase 16 @@ -314,7 +316,7 @@ local -AHPrt substmodifiers=( $((0x0400)) SUB_DOSUBST # replacement string needs substituting $((0x4000)) SUB_EGLOB # use extended globbing in patterns ) -local -AHPrt printnodeflags=( +local -AHPrt printparamflags=( mapbase 2 $((1<<0)) PRINT_NAMEONLY $((1<<1)) PRINT_TYPE @@ -325,6 +327,9 @@ local -AHPrt printnodeflags=( $((1<<6)) PRINT_LINE $((1<<7)) PRINT_POSIX_EXPORT $((1<<8)) PRINT_POSIX_READONLY + $((1<<9)) PRINT_WITH_NAMESPACE +) +local -AHPrt printwhenceflags=( $((1<<7)) PRINT_WHENCE_CSH $((1<<8)) PRINT_WHENCE_VERBOSE $((1<<9)) PRINT_WHENCE_SIMPLE -- cgit v1.2.3 From be223aedee772fc31e12ec8c5277f50aae25b0fe Mon Sep 17 00:00:00 2001 From: Matt Koscica Date: Mon, 9 Oct 2023 22:26:27 +0200 Subject: github #106: update tmux completion (20230919); tweak Util/check-tmux-state - update tmux completion functions - tweak check-tmux-state to take current file format into account --- ChangeLog | 3 +++ Completion/Unix/Command/_tmux | 12 ++++++++++-- Util/check-tmux-state | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) (limited to 'Util') diff --git a/ChangeLog b/ChangeLog index 2e5863fea..4f5c6b024 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2023-11-14 Oliver Kiddle + * github #106: Matt Koscica: Completion/Unix/Command/_tmux, + Util/check-tmux-state: update tmux completion (20230919) + * unposted (cf. 52167): Completion/Unix/Command/_mutt: mutt's -a takes a list of files terminated by -- diff --git a/Completion/Unix/Command/_tmux b/Completion/Unix/Command/_tmux index c8ed24b26..b9c220f17 100644 --- a/Completion/Unix/Command/_tmux +++ b/Completion/Unix/Command/_tmux @@ -145,7 +145,6 @@ _tmux_aliasmap=( if if-shell lock lock-server run run-shell - info server-info wait wait-for ) @@ -881,7 +880,7 @@ _tmux-send-prefix() { # aliasmap system in check-tmux-state can properly handle aliases which are # more complex than a single word, it's best to leave this here. -_tmux-server-info() { +_tmux-server-access() { [[ -n ${tmux_describe} ]] && print "show server information" && return __tmux-nothing-else } @@ -1654,6 +1653,7 @@ function __tmux-session-options() { 'lock-after-time:lock sessions after N seconds' 'lock-command:command to run for locking a client' 'message-command-style:status line message command style' + 'message-line:status message and command prompt position' 'message-style:status line message style' 'mouse:enable mouse support' 'prefix:primary prefix key' @@ -1798,6 +1798,7 @@ function __tmux-window-options() { local -a tmux_window_options tmux_window_options=( 'aggressive-resize:aggressively resize windows' + 'allow-passthrough:allow programs in the pane to bypass tmux' 'allow-rename:allow programs to change window titles' 'alternate-screen:allow alternate screen feature to be used' 'automatic-rename-format:format for automatic renames' @@ -1809,8 +1810,13 @@ function __tmux-window-options() { 'copy-mode-match-style:set the style of search matches in copy mode' 'cursor-colour:set the colour of the cursor' 'cursor-style:set the style of the cursor' + 'fill-character:set the character used to fill unused window areas' 'main-pane-height:set height for main-* layouts' 'main-pane-width:set width for main-* layouts' + 'menu-style:set the menu style' + 'menu-selected-style:set the selected menu item style' + 'menu-border-style:set the menu border style' + 'menu-border-lines:set the type of characters used for drawing menu borders' 'mode-keys:mode to use in copy and choice modes (vi/emacs)' 'mode-style:set window modes style' 'monitor-activity:monitor window activity' @@ -1830,6 +1836,8 @@ function __tmux-window-options() { "popup-border-style:set the style for the popup's border" 'popup-style:set the popup style' "remain-on-exit:don't destroy windows after the program exits" + "remain-on-exit-format:set the text shown at bottom of exited panes" + 'scroll-on-clear:scroll previous contents into history before clear' 'synchronize-panes:send input to all panes of a window' 'window-active-style:style of active window' 'window-size:indicate how to automatically size windows' diff --git a/Util/check-tmux-state b/Util/check-tmux-state index d95e0c230..9772eefc1 100755 --- a/Util/check-tmux-state +++ b/Util/check-tmux-state @@ -59,7 +59,7 @@ __tmux-window-options # in the _tmux function definition file. typeset -a supported_commands supported_commands=( $( grep '^_tmux-[^(]*() *{$' $func | - sed -e 's,^.*\<_tmux-,,' -e 's,(.*$,,' ) ) + sed -e 's,^_tmux[-]\([a-z-]*\)[(].*,\1,' ) ) # Ask tmux for available commands: typeset -a available_commands -- cgit v1.2.3 From c8f0946ddc428ff2d44e304d188b238c20c56484 Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Sat, 3 Feb 2024 22:00:35 -0800 Subject: unposted: updates and fixed omissions for the printdefines utility --- ChangeLog | 2 ++ Util/printdefines | 74 ++++++++++++++++++++++++++++++++++++++----------------- 2 files changed, 53 insertions(+), 23 deletions(-) (limited to 'Util') diff --git a/ChangeLog b/ChangeLog index 238c12c16..4f059baa1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2024-02-03 Bart Schaefer + * unposted: Util/printdefines: updates and fix omissions + * unposted: cf. Roman in users/29472: Functions/Misc/zslurp: Efficient lossless read of stdin into $REPLY diff --git a/Util/printdefines b/Util/printdefines index c1306a19e..c127ad586 100644 --- a/Util/printdefines +++ b/Util/printdefines @@ -54,6 +54,7 @@ local -AHPrt paramflags=( # $((1<<12)) PM_ABSPATH_USED # (function): loaded using absolute path $((1<<13)) PM_UNIQUE # remove duplicates +# $((1<<13)) PM_SELFREF # Overload when namerefs resolved # $((1<<13)) PM_UNALIASED # (function) do not expand aliases $((1<<14)) PM_HIDE # Special behaviour hidden by local @@ -67,7 +68,8 @@ local -AHPrt paramflags=( $((1<<17)) PM_DONTIMPORT_SUID # do not import if running setuid # $((1<<17)) PM_LOADDIR # (function) filename gives load directory $((1<<18)) PM_SINGLE # special can only have a single instance - $((1<<18)) PM_ANONYMOUS # (function) anonymous function +# $((1<<18)) PM_NEWREF # Overload in for-loop namerefs +# $((1<<18)) PM_ANONYMOUS # (function) anonymous function $((1<<19)) PM_LOCAL # this parameter will be made local # $((1<<19)) PM_KSHSTORED # (function) stored in ksh form $((1<<20)) PM_SPECIAL # special builtin parameter @@ -82,33 +84,45 @@ local -AHPrt paramflags=( $((1<<25)) PM_REMOVABLE # special can be removed from paramtab $((1<<26)) PM_AUTOLOAD # autoloaded from module $((1<<27)) PM_NORESTORE # do not restore value of local special - $((1<<27)) PM_AUTOALL # autoload all features in module +# $((1<<27)) PM_AUTOALL # autoload all features in module $((1<<28)) PM_HASHELEM # is a hash-element $((1<<29)) PM_NAMEDDIR # has a corresponding nameddirtab entry $((1<<30)) PM_NAMEREF # pointer to a different parameter ) local -AHPrt chartokens=( - mapbase integer - $((83)) Meta - $((84)) Pound - $((85)) String - $((86)) Hat - $((87)) Star - $((88)) Inpar - $((89)) Inparmath - $((90)) Outbrace - $((91)) Inbrack - $((92)) Outbrack - $((93)) Tick - $((94)) Inang - $((95)) Outang - $((96)) OutangProc - $((97)) Quest - $((98)) Tilde - $((99)) Qtick - $((a0)) Bnullkeep - $((a1)) Nularg - $((a2)) Marker + mapbase 16 + $((0x83)) Meta + $((0x84)) Pound + $((0x85)) String + $((0x86)) Hat + $((0x87)) Star + $((0x88)) Inpar + $((0x89)) Inparmath + $((0x8a)) Outpar + $((0x8b)) Outparmath + $((0x8c)) Qstring + $((0x8d)) Equals + $((0x8e)) Bar + $((0x8f)) Inbrace + $((0x90)) Outbrace + $((0x91)) Inbrack + $((0x92)) Outbrack + $((0x93)) Tick + $((0x94)) Inang + $((0x95)) Outang + $((0x96)) OutangProc + $((0x97)) Quest + $((0x98)) Tilde + $((0x99)) Qtick + $((0x9a)) Comma + $((0x9b)) Dash # Only in patterns + $((0x9c)) Bang # Only in patterns + $((0x9d)) Snull + $((0x9e)) Dnull + $((0x9f)) Bnull + $((0xa0)) Bnullkeep + $((0xa1)) Nularg + $((0xa2)) Marker ) local -AHPrt fdtabletype=( mapbase integer @@ -120,6 +134,7 @@ local -AHPrt fdtabletype=( $((5)) FDT_FLOCK $((6)) FDT_FLOCK_EXEC $((7)) FDT_PROC_SUBST +#$((16)) FDT_SAVED_MASK ) local -AHPrt inputstates=( mapbase 2 @@ -129,6 +144,9 @@ local -AHPrt inputstates=( $((1<<3)) INP_CONT $((1<<4)) INP_ALCONT $((1<<5)) INP_HISTCONT + $((1<<6)) INP_LINENO + $((1<<7)) INP_APPEND + $((1<<8)) INP_RAW_KEEP ) local -AHPrt metafytypes=( mapbase integer @@ -175,12 +193,15 @@ local -AHPrt condtypes=( ) local -AHPrt wordcodes=( mapbase integer + $((0)) WC_END $((1)) WC_LIST $((2)) WC_SUBLIST $((3)) WC_PIPE $((4)) WC_REDIR $((5)) WC_ASSIGN +#$((5)) WC_SUBLIST_FREE $((6)) WC_SIMPLE +#$((6)) WC_LIST_FREE $((7)) WC_TYPESET $((8)) WC_SUBSH $((9)) WC_CURSH @@ -219,6 +240,7 @@ local -AHPrt builtintypes=( $((1<<1)) BINF_PLUSOPTS # +xyz legal $((1<<2)) BINF_PRINTOPTS $((1<<3)) BINF_ADDED # is in the builtins hash table + $((1<<4)) BINF_MAGICEQUALS $((1<<5)) BINF_PREFIX $((1<<6)) BINF_DASH $((1<<7)) BINF_BUILTIN @@ -246,9 +268,11 @@ local -AHPrt patflags=( $((0x0020)) PAT_PURES # Pattern is a pure string: set internally $((0x0040)) PAT_STATIC # Don't copy pattern to heap as per default $((0x0080)) PAT_SCAN # Scanning, so don't try must-match test + $((0x0100)) PAT_ZDUP # Copy pattern in real memory $((0x0200)) PAT_NOTSTART # Start of string is not real start $((0x0400)) PAT_NOTEND # End of string is not real end $((0x0800)) PAT_HAS_EXCLUDP # (internal): top-level path1~path2. + $((0x1000)) PAT_LCMATCHUC # equivalent to setting (#l) ) local -AHPrt patclasses=( mapbase integer @@ -314,6 +338,9 @@ local -AHPrt substmodifiers=( $((0x0100)) SUB_ALL # match complete string $((0x0200)) SUB_GLOBAL # global substitution ${..//all/these} $((0x0400)) SUB_DOSUBST # replacement string needs substituting + $((0x0800)) SUB_RETFAIL # return status 0 if no match + $((0x1000)) SUB_START # force match at start with SUB_END + $((0x2000)) SUB_LIST # no substitution, return list of matches $((0x4000)) SUB_EGLOB # use extended globbing in patterns ) local -AHPrt printparamflags=( @@ -333,6 +360,7 @@ local -AHPrt printwhenceflags=( $((1<<7)) PRINT_WHENCE_CSH $((1<<8)) PRINT_WHENCE_VERBOSE $((1<<9)) PRINT_WHENCE_SIMPLE +#$((1<<9)) PRINT_WITH_NAMESPACE $((1<<10)) PRINT_WHENCE_FUNCDEF $((1<<11)) PRINT_WHENCE_WORD ) -- cgit v1.2.3 From 6b25a593d9dab13fd0314467ff93ba88546b3470 Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Wed, 12 Feb 2025 20:06:43 -0800 Subject: 53346 (cf. 53350): Util/helpfiles: fix use of "man" on file paths --- ChangeLog | 2 ++ Util/helpfiles | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'Util') diff --git a/ChangeLog b/ChangeLog index 929abce32..2c11f7081 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2025-02-12 Bart Schaefer + * 53346 (cf. 53350): Util/helpfiles: fix use of "man" on file paths + * 53348: Doc/Zsh/builtins.yo, Src/builtin.c, Test/K01nameref.ztst: Revise handling of incompatible typeset options when used with -n diff --git a/Util/helpfiles b/Util/helpfiles index 9e837fe2d..58aa04bba 100755 --- a/Util/helpfiles +++ b/Util/helpfiles @@ -54,7 +54,7 @@ $ENV{'GROFF_NO_SGR'} = ''; # We need "classical" formatting of man pages. $mantmp = $destdir . '/man.tmp'; $coltmpbase = 'col.tmp'; $coltmp = $destdir . '/' . $coltmpbase; -$args = "$manfile >$mantmp"; +$args = "./$manfile >$mantmp"; unlink($mantmp); &Info('attempting man ', $args); if(system('man ' . $args) || !(-s $mantmp)) { -- cgit v1.2.3