Skip to content

Commit ea21900

Browse files
committed
Update documentation
1 parent d6a3fd5 commit ea21900

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Diff for: server/src/util/sourcing.ts

+7-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const SOURCED_FILES_REG_EXP = /^(?:\t|[ ])*(?:source|[.])\s*(\S*)/gm
1010

1111
/**
1212
* Analysis the given file content and returns a set of URIs that are
13-
* sourced. Note that the URIs are not resolved.
13+
* sourced. Note that the URIs are resolved.
1414
*/
1515
export function getSourcedUris({
1616
fileContent,
@@ -97,6 +97,12 @@ const stripQuotes = (path: string): string => {
9797
* Tries to parse the given path and returns a URI if possible.
9898
* - Filters out dynamic sources
9999
* - Converts a relative paths to absolute paths
100+
* - Converts a tilde path to an absolute path
101+
* - Resolves the path
102+
*
103+
* NOTE: for future improvements:
104+
* "If filename does not contain a slash, file names in PATH are used to find
105+
* the directory containing filename." (see https://ss64.com/osx/source.html)
100106
*/
101107
function getSourcedUri({
102108
rootPaths,
@@ -105,10 +111,6 @@ function getSourcedUri({
105111
rootPaths: string[]
106112
word: string
107113
}): string | null {
108-
// NOTE: improvements:
109-
// - we could try to resolve the path
110-
// - "If filename does not contain a slash, file names in PATH are used to find
111-
// the directory containing filename." (see https://ss64.com/osx/source.html)
112114
let unquotedPath = stripQuotes(word)
113115

114116
if (unquotedPath.includes('$')) {

0 commit comments

Comments
 (0)