@@ -9,42 +9,6 @@ const { Graph } = require('../graph/Graph');
99const { cloneDeep } = require ( 'lodash' ) ;
1010const dotenv = require ( 'dotenv' ) ;
1111
12- const omelette = require ( 'omelette' ) ;
13-
14- // Initialize tab completion
15- const completion = omelette ( 'flow' ) ;
16-
17- completion . on ( 'complete' , ( fragment , data ) => {
18- if ( data . line . endsWith ( '--file ' ) || data . line . endsWith ( '--env ' ) ) {
19- completion . reply ( [ ] ) ;
20- } else {
21- // Dynamically list directories and files as suggestions
22- const fs = require ( 'fs' ) ;
23- const path = require ( 'path' ) ;
24-
25- const lineParts = data . line . split ( ' ' ) ;
26- const basePath = lineParts [ lineParts . length - 1 ] ;
27-
28- try {
29- const items = fs . readdirSync ( basePath , { withFileTypes : true } ) ;
30- // console.log(`Base path: ${basePath}`);
31- // console.log(`Items: ${JSON.stringify(items)}`);
32- const results = items . map ( ( item ) => path . join ( basePath , item . name ) + ( item . isDirectory ( ) ? '/' : '' ) ) ;
33- completion . reply ( results ) ;
34- } catch ( error ) {
35- completion . reply ( [ ] ) ;
36- }
37- }
38- } ) ;
39-
40- completion . init ( ) ;
41-
42- if ( ~ process . argv . indexOf ( '--completion' ) ) {
43- completion . setupShellInitFile ( ) ;
44- console . log ( 'Run `source ~/.bashrc` or restart your terminal to activate completion.' ) ;
45- process . exit ( ) ;
46- }
47-
4812const getEnvVariables = ( pathname ) => {
4913 const content = readFile ( pathname ) ;
5014 const buf = Buffer . from ( content ) ;
0 commit comments