Add trailing slash when completing directories
This commit is contained in:
parent
4eed0d8695
commit
41eda1ac5b
|
@ -275,6 +275,10 @@ proc completeCmdArg*(T: type[InputFile|InputDir], val: TaintedString): seq[strin
|
|||
type(T) is InputDir and kind in {pcDir, pcLinkToDir}:
|
||||
# Note, no normalization is needed here
|
||||
if path.startsWith(tail):
|
||||
if type(T) is InputDir:
|
||||
# Add a trailing slash so that completions can be chained
|
||||
result.add(dir / path & '/')
|
||||
else:
|
||||
result.add(dir / path)
|
||||
|
||||
proc completeCmdArg*(T: type[OutFile|OutDir|OutPath], val: TaintedString): seq[string] =
|
||||
|
|
Loading…
Reference in New Issue