mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-11-01 06:20:55 +01:00
add -[ak] options to compadd (11533)
This commit is contained in:
parent
00772b72a7
commit
22c3204495
6 changed files with 77 additions and 12 deletions
15
Src/params.c
15
Src/params.c
|
|
@ -1741,6 +1741,21 @@ gethparam(char *s)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/* Retrieve the keys of an assoc array parameter as an array */
|
||||
|
||||
/**/
|
||||
mod_export char **
|
||||
gethkparam(char *s)
|
||||
{
|
||||
struct value vbuf;
|
||||
Value v;
|
||||
|
||||
if (!idigit(*s) && (v = getvalue(&vbuf, &s, 0)) &&
|
||||
PM_TYPE(v->pm->flags) == PM_HASHED)
|
||||
return paramvalarr(v->pm->gets.hfn(v->pm), SCANPM_WANTKEYS);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**/
|
||||
mod_export Param
|
||||
setsparam(char *s, char *val)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue