diff runtime/doc/builtin.txt @ 29810:761631155a90 v9.0.0244

patch 9.0.0244: cannot easily get the list of sourced scripts Commit: https://github.com/vim/vim/commit/f768c3d19c518822d89dec4cc3947ddeea249316 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Mon Aug 22 13:15:13 2022 +0100 patch 9.0.0244: cannot easily get the list of sourced scripts Problem: Cannot easily get the list of sourced scripts. Solution: Add the getscriptinfo() function. (Yegappan Lakshmanan, closes #10957)
author Bram Moolenaar <Bram@vim.org>
date Mon, 22 Aug 2022 14:30:04 +0200
parents 90a966f5c77a
children 6b7020f3d856
line wrap: on
line diff
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -253,6 +253,7 @@ getreg([{regname} [, 1 [, {list}]]])
 				String or List   contents of a register
 getreginfo([{regname}])		Dict	information about a register
 getregtype([{regname}])		String	type of a register
+getscriptinfo()		List	list of sourced scripts
 gettabinfo([{expr}])		List	list of tab pages
 gettabvar({nr}, {varname} [, {def}])
 				any	variable {varname} in tab {nr} or {def}
@@ -4088,6 +4089,18 @@ getregtype([{regname}])					*getregtype(
 		Can also be used as a |method|: >
 			GetRegname()->getregtype()
 
+getscriptinfo()					*getscriptinfo()*
+		Returns a |List| with information about all the sourced Vim
+		scripts in the order they were sourced. (|:scriptinfo|)
+
+		Each item in the returned List is a |Dict| with the following
+		items:
+		    autoload	set to TRUE for a script that was used with
+				|import autoload| but was not actually sourced
+				yet.
+		    name	vim script file name.
+		    sid		script ID |<SID>|.
+
 gettabinfo([{tabnr}])					*gettabinfo()*
 		If {tabnr} is not specified, then information about all the
 		tab pages is returned as a |List|. Each List item is a