Skip to main content
added 4 characters in body
Source Link
Stéphane Chazelas
  • 585.1k
  • 96
  • 1.1k
  • 1.7k

Aliases and functions are contained in aliases and functions, and one merely needs to print the keys of such. "Variables and arrays" is trickier; parameters may suffice?

print -lrl -- ${(k)aliases} ${(k)functions} ${(k)parameters}

(You may also need builtins, commands, and perhaps other things listed from print -l ${(k) and then mashing tab, assuming completion is enabled.)

Aliases and functions are contained in aliases and functions, and one merely needs to print the keys of such. "Variables and arrays" is trickier; parameters may suffice?

print -l ${(k)aliases} ${(k)functions} ${(k)parameters}

(You may also need builtins, commands, and perhaps other things listed from print -l ${(k) and then mashing tab, assuming completion is enabled.)

Aliases and functions are contained in aliases and functions, and one merely needs to print the keys of such. "Variables and arrays" is trickier; parameters may suffice?

print -rl -- ${(k)aliases} ${(k)functions} ${(k)parameters}

(You may also need builtins, commands, and perhaps other things listed from print -l ${(k) and then mashing tab, assuming completion is enabled.)

Source Link
thrig
  • 35.8k
  • 4
  • 70
  • 88

Aliases and functions are contained in aliases and functions, and one merely needs to print the keys of such. "Variables and arrays" is trickier; parameters may suffice?

print -l ${(k)aliases} ${(k)functions} ${(k)parameters}

(You may also need builtins, commands, and perhaps other things listed from print -l ${(k) and then mashing tab, assuming completion is enabled.)