File tree Expand file tree Collapse file tree 6 files changed +18
-9
lines changed Expand file tree Collapse file tree 6 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ export namespace Plugin {
125
125
exec : string
126
126
icon : string
127
127
fill ?: string
128
+ examples ?: string
128
129
}
129
130
130
131
export function read ( file : string ) : Config | null {
Original file line number Diff line number Diff line change @@ -17,10 +17,14 @@ export class ShellBuiltin extends plugins.Builtin {
17
17
18
18
for ( const [ name , service ] of ext . window_search . service . plugins ) {
19
19
if ( service . config . pattern ?. length > 0 ) {
20
+ const example = service . config . examples
21
+ ? service . config . examples
22
+ : service . config . pattern ;
23
+
20
24
this . selections . push ( {
21
25
id,
22
26
name,
23
- description : service . config . description + `: ${ service . config . pattern } ` ,
27
+ description : service . config . description + `: ${ example } ` ,
24
28
fill : service . config . fill
25
29
} )
26
30
id += 1 ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " Calculator" ,
3
- "description" : " Perform calculations from terminal " ,
3
+ "description" : " Math.JS calculations" ,
4
4
"pattern" : " ^(=)+" ,
5
5
"exec" : " main.js" ,
6
6
"icon" : " x-office-spreadsheet" ,
7
- "fill" : " ="
7
+ "fill" : " =" ,
8
+ "examples" : " =5+5, =2 liters in quarts"
8
9
}
Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " File Search " ,
3
- "description" : " Searches files in the file system" ,
2
+ "name" : " File Navigation " ,
3
+ "description" : " Navigate the file system with tab auto-completion " ,
4
4
"pattern" : " ^(\/ |~).*" ,
5
5
"exec" : " main.js" ,
6
6
"icon" : " system-file-manager" ,
7
- "fill" : " ~/"
7
+ "fill" : " ~/" ,
8
+ "examples" : " ~/Documents, /mnt/media/Videos"
8
9
}
Original file line number Diff line number Diff line change 4
4
"pattern" : " ^(:|t:|run ).*" ,
5
5
"exec" : " main.js" ,
6
6
"icon" : " utilities-terminal" ,
7
- "fill" : " run "
7
+ "fill" : " run " ,
8
+ "examples" : " run cmd, t:cmd, t cmd"
8
9
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " Web Search" ,
3
- "description" : " Searches " ,
3
+ "description" : " Site-specific web search " ,
4
4
"pattern" : " ^(amazon|wiki|bing|ddg|google|yt|stack|crates|arch|pp|ppw|rdt|bc|lib|npm|gist|fh|gh|dev|sdcl|twitch|yh|alie)\\ s.*" ,
5
5
"exec" : " main.js" ,
6
6
"icon" : " system-search" ,
7
- "fill" : " ddg "
7
+ "fill" : " ddg " ,
8
+ "examples" : " ddg search, yt video, amazon product"
8
9
}
You can’t perform that action at this time.
0 commit comments