Skip to content

Commit 735261b

Browse files
committed
refactor: added some types and changed types of fields for Completion object
FossilOrigin-Name: 7ab1032016911f394898c24789858787819a7118dd4428d32a3a7f663d1c5270
1 parent c4348be commit 735261b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/types.nim

+6-2
Original file line numberDiff line numberDiff line change
@@ -124,16 +124,20 @@ type
124124
dirs = "Directories only", files = "Files only",
125125
dirsfiles = "Directories and files", commands = "Commands",
126126
custom = "Custom", none = "Completion for the selected command should be disabled"
127+
CompletionCommand* = string
128+
## Used to store the command to which completion will be added
129+
CompletionValues* = string
130+
## Used to store the values of the selected completion
127131
Completion* {.tableName: "completions".} = ref object of Model
128132
## Data structure for the shell's commands' completion
129133
##
130134
## * command - the command for which the completion is set
131135
## * cType - the type of completion for the command
132136
## * values - the proper values of completion if the completion's type is
133137
## set to the custom type
134-
command* {.unique.}: string
138+
command* {.unique.}: CompletionCommand
135139
cType*: CompletionType
136-
cValues*: string
140+
cValues*: CompletionValues
137141
Plugin* {.tableName: "plugins".} = ref object of Model
138142
## Data structure for the shell's plugin
139143
##

0 commit comments

Comments
 (0)