File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
packages/web-host/src/utils Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -46,10 +46,20 @@ function man_weather() {
4646 return "man weather" ;
4747}
4848
49- function ls ( ) {
49+ function ls ( path ?: string ) {
50+ if ( path ) {
51+ return `ls ${ path } ` ;
52+ }
5053 return "ls" ;
5154}
5255
56+ function cat ( path ?: string ) {
57+ if ( path ) {
58+ return `cat ${ path } ` ;
59+ }
60+ return "cat" ;
61+ }
62+
5363function weather_Paris ( ) {
5464 return "weather Paris" ;
5565}
@@ -87,6 +97,13 @@ export function getExampleCommand() {
8797 echo_$ROOT_$USER ,
8898 weather_Paris ,
8999 ls ,
100+ ( ) => cat ( "README.md" ) ,
101+ ls ,
102+ ( ) => ls ( "data" ) ,
103+ ( ) => ls ( "data/processed" ) ,
104+ ( ) => ls ( "data/processed/2024" ) ,
105+ ( ) => ls ( "documents" ) ,
106+ ( ) => cat ( "documents/config.json" ) ,
90107 man_weather ,
91108 help ,
92109 ] ;
You can’t perform that action at this time.
0 commit comments