Debian Codegraph @

init/fish_completion

raw
1 #completion for modules
2
3 function __fish_module_no_subcommand --description 'Test if modulecmd has yet to be given the subcommand'
4 for i in (commandline -opc)
5 if contains -- $i add add-any load load-any try-add try-load rm remove del unload swap switch show display lint list avail is-loaded is-saved is-used is-avail info-loaded aliases use unuse refresh reload purge source whatis apropos keyword search test save reset restore saverm saveshow savelist stash stashclear stashlist stashpop stashrm stashshow initadd initprepend initrm initswitch initlist initclear path paths append-path prepend-path remove-path clear config sh-to-mod edit state mod-to-sh cachebuild cacheclear spider update disable describe
6 return 1
7 end
8 end
9 return 0
10 end
11
12 function __fish_module_use_avail --description 'Test if module command should have available packages as potential completion'
13 for i in (commandline -opc)
14 if contains -- $i help add add-any load load-any try-add try-load swap switch show display avail is-loaded is-avail info-loaded whatis test initadd initprepend path paths edit lint mod-to-sh
15 return 0
16 end
17 end
18 return 1
19 end
20
21 function __fish_module_use_spider --description 'Test if module command should have spidered packages as potential completion'
22 for i in (commandline -opc)
23 if contains -- $i spider
24 return 0
25 end
26 end
27 return 1
28 end
29
30 function __fish_module_use_list --description 'Test if module command should have loaded packages as potential completion'
31 for i in (commandline -opc)
32 if contains -- $i swap switch rm remove del unload
33 return 0
34 end
35 end
36 return 1
37 end
38
39 function __fish_module_use_initlist --description 'Test if module command should have packages in init file as potential completion'
40 for i in (commandline -opc)
41 if contains -- $i initrm initswitch
42 return 0
43 end
44 end
45 return 1
46 end
47
48 function __fish_module_use_savelist --description 'Test if module command should have saved collections as potential completion'
49 for i in (commandline -opc)
50 if contains -- $i save restore saverm disable saveshow describe savelist is-saved
51 return 0
52 end
53 end
54 return 1
55 end
56
57 function __fish_module_use_stashlist --description 'Test if module command should have stash collections as potential completion'
58 for i in (commandline -opc)
59 if contains -- $i stashpop stashrm stashshow
60 return 0
61 end
62 end
63 return 1
64 end
65
66 function __fish_module_use_config --description 'Test if module command should have configuration parameters as potential completion'
67 for i in (commandline -opc)
68 if contains -- $i config
69 return 0
70 end
71 end
72 return 1
73 end
74
75 complete -c module -n '__fish_module_use_avail' -f -a "(module avail --color=never -s -t -S --no-indepth -o 'alias:indesym' (commandline -ct) 2>&1)"
76 complete -c module -n '__fish_module_use_spider' -f -a "(module spider --color=never -s -t -S --no-indepth -o 'alias:indesym' (commandline -ct) 2>&1)"
77 complete -c module -n '__fish_module_use_list' -f -a "(module list --color=never -s -t -o '' 2>&1)"
78 complete -c module -n '__fish_module_use_initlist' -f -a "(module initlist --color=never -s 2>&1 | sed '\
79 / loads modules:\$/d;')"
80 complete -c module -n '__fish_module_use_savelist' -f -a "(module savelist --color=never -s -t 2>&1 | sed '\
81 /No named collection\.\$/d; \
82 /Named collection list\$/d; \
83 /:\$/d; \
84 /:ERROR:/d;')"
85 complete -c module -n '__fish_module_use_stashlist' -f -a "(module stashlist --color=never -s -t 2>&1 | sed '\
86 /No stash collection\.\$/d; \
87 /Stash collection list\$/d; \
88 /:\$/d; \
89 /:ERROR:/d;')"
90 complete -c module -n '__fish_module_use_config' -f -a "--dump-state --reset abort_on_error advanced_version_spec auto_handling avail_indepth avail_output avail_terse_output cache_buffer_bytes cache_expiry_secs collection_pin_version collection_pin_tag collection_target color colors conflict_unload contact editor extended_default extra_siteconfig hide_auto_loaded home icase ignore_cache ignore_user_rc implicit_default implicit_requirement list_output list_terse_output locked_configs logged_events logger mcookie_check mcookie_version_check ml nearly_forbidden_days pager protected_envvars quarantine_support rcfile redirect_output require_via reset_target_state run_quarantine search_match set_shell_startup shells_with_ksh_fpath silent_shell_debug source_cache spider_indepth spider_output spider_terse_output sticky_purge tag_abbrev tag_color_name tcl_linter term_background term_width unique_name_loaded unload_match_order variant_shortcut verbosity wa_277"
91
92 complete -f -n '__fish_module_no_subcommand' -c module -a 'help' --description 'Print this or modulefile(s) help info'
93 complete -f -n '__fish_module_no_subcommand' -c module -a 'avail' --description 'List all or matching available modules'
94 complete -f -n '__fish_module_no_subcommand' -c module -a 'spider' --description 'Scan all modulepaths and list all or matching available modules'
95 complete -f -n '__fish_module_no_subcommand' -c module -a 'is-avail' --description 'Is any of the modulefile(s) available'
96 complete -f -n '__fish_module_no_subcommand' -c module -a 'add load' --description 'Load modulefile(s)'
97 complete -f -n '__fish_module_no_subcommand' -c module -a 'add-any load-any' --description 'Load first available modulefile in list'
98 complete -f -n '__fish_module_no_subcommand' -c module -a 'try-add try-load' --description 'Attempt to load modulefile(s), no complain'
99 complete -f -n '__fish_module_no_subcommand' -c module -a 'rm remove del unload' --description 'Remove modulefile(s)'
100 complete -f -n '__fish_module_no_subcommand' -c module -a 'swap switch' --description 'Unload mod1 and load mod2'
101 complete -f -n '__fish_module_no_subcommand' -c module -a 'show display' --description 'Display information about modulefile(s)'
102 complete -f -n '__fish_module_no_subcommand' -c module -a 'list' --description 'List loaded modules'
103 complete -f -n '__fish_module_no_subcommand' -c module -a 'is-loaded' --description 'Test if any of the modulefile(s) are loaded'
104 complete -f -n '__fish_module_no_subcommand' -c module -a 'info-loaded' --description 'Get full name of matching loaded module(s)'
105 complete -f -n '__fish_module_no_subcommand' -c module -a 'aliases' --description 'List all module aliases'
106 complete -f -n '__fish_module_no_subcommand' -c module -a 'use' --description 'Add dir(s) to MODULEPATH variable'
107 complete -f -n '__fish_module_no_subcommand' -c module -a 'unuse' --description 'Remove dir(s) from MODULEPATH variable'
108 complete -f -n '__fish_module_no_subcommand' -c module -a 'is-used' --description 'Is any of the dir(s) enabled in MODULEPATH'
109 complete -f -n '__fish_module_no_subcommand' -c module -a 'refresh' --description 'Refresh volatile components of loaded modulefiles'
110 complete -f -n '__fish_module_no_subcommand' -c module -a 'reload update' --description 'Unload then load all loaded modulefiles'
111 complete -f -n '__fish_module_no_subcommand' -c module -a 'purge' --description 'Unload all loaded modulefiles'
112 complete -f -n '__fish_module_no_subcommand' -c module -a 'source' --description 'Execute scriptfile(s)'
113 complete -f -n '__fish_module_no_subcommand' -c module -a 'whatis' --description 'Print whatis information of modulefile(s)'
114 complete -f -n '__fish_module_no_subcommand' -c module -a 'apropos keyword search' --description 'Search all name and whatis containing str'
115 complete -f -n '__fish_module_no_subcommand' -c module -a 'test' --description 'Test modulefile(s)'
116 complete -f -n '__fish_module_no_subcommand' -c module -a 'save' --description 'Save current module list to collection'
117 complete -f -n '__fish_module_no_subcommand' -c module -a 'restore' --description 'Restore module list from collection or file'
118 complete -f -n '__fish_module_no_subcommand' -c module -a 'saverm' --description 'Remove saved collection'
119 complete -f -n '__fish_module_no_subcommand' -c module -a 'disable' --description 'Remove saved collection'
120 complete -f -n '__fish_module_no_subcommand' -c module -a 'saveshow' --description 'Display information about collection'
121 complete -f -n '__fish_module_no_subcommand' -c module -a 'describe' --description 'Display information about collection'
122 complete -f -n '__fish_module_no_subcommand' -c module -a 'savelist' --description 'List all saved collections'
123 complete -f -n '__fish_module_no_subcommand' -c module -a 'is-saved' --description 'Test if any of the collection(s) exists'
124 complete -f -n '__fish_module_no_subcommand' -c module -a 'initadd' --description 'Add modulefile to shell init file'
125 complete -f -n '__fish_module_no_subcommand' -c module -a 'initprepend' --description 'Add to beginning of list in init file'
126 complete -f -n '__fish_module_no_subcommand' -c module -a 'initrm' --description 'Remove modulefile from shell init file'
127 complete -f -n '__fish_module_no_subcommand' -c module -a 'initswitch' --description 'Switch mod1 with mod2 from init file'
128 complete -f -n '__fish_module_no_subcommand' -c module -a 'initlist' --description 'List all modules loaded from init file'
129 complete -f -n '__fish_module_no_subcommand' -c module -a 'initclear' --description 'Clear all modulefiles from init file'
130 complete -f -n '__fish_module_no_subcommand' -c module -a 'path' --description 'Print modulefile path'
131 complete -f -n '__fish_module_no_subcommand' -c module -a 'paths' --description 'Print path of matching available modules'
132 complete -f -n '__fish_module_no_subcommand' -c module -a 'append-path' --description 'Append value to environment variable'
133 complete -f -n '__fish_module_no_subcommand' -c module -a 'prepend-path' --description 'Prepend value to environment variable'
134 complete -f -n '__fish_module_no_subcommand' -c module -a 'remove-path' --description 'Remove value from environment variable'
135 complete -f -n '__fish_module_no_subcommand' -c module -a 'clear' --description 'Reset Modules-specific runtime information'
136 complete -f -n '__fish_module_no_subcommand' -c module -a 'config' --description 'Display or set Modules configuration'
137 complete -f -n '__fish_module_no_subcommand' -c module -a 'sh-to-mod' --description 'Make modulefile from script env changes'
138 complete -f -n '__fish_module_no_subcommand' -c module -a 'edit' --description 'Open modulefile in editor'
139 complete -f -n '__fish_module_no_subcommand' -c module -a 'state' --description 'Display Modules state'
140 complete -f -n '__fish_module_no_subcommand' -c module -a 'lint' --description 'Check syntax of modulefile'
141 complete -f -n '__fish_module_no_subcommand' -c module -a 'mod-to-sh' --description 'Make shell code from modulefile env changes'
142 complete -f -n '__fish_module_no_subcommand' -c module -a 'reset' --description 'Restore initial environment'
143 complete -f -n '__fish_module_no_subcommand' -c module -a 'stash' --description 'Save current environment and reset'
144 complete -f -n '__fish_module_no_subcommand' -c module -a 'stashclear' --description 'Remove all stash collections'
145 complete -f -n '__fish_module_no_subcommand' -c module -a 'stashlist' --description 'List all stash collections'
146 complete -f -n '__fish_module_no_subcommand' -c module -a 'stashpop' --description 'Restore then remove stash collection'
147 complete -f -n '__fish_module_no_subcommand' -c module -a 'stashrm' --description 'Remove stash collection'
148 complete -f -n '__fish_module_no_subcommand' -c module -a 'stashshow' --description 'Display information about stash collection'
149 complete -f -n '__fish_module_no_subcommand' -c module -a 'cachebuild' --description 'Create cache file for modulepath(s)'
150 complete -f -n '__fish_module_no_subcommand' -c module -a 'cacheclear' --description 'Delete cache file in enabled modulepath(s)'
151
152 complete -c module -s V -l version --description 'Module version'
153 complete -c module -l dumpname --description 'Module implementation name'
154 complete -c module -s T -l trace --description 'Enable trace and debug messages'
155 complete -c module -s D -l debug --description 'Enable debug messages'
156 complete -c module -s v -l verbose --description 'Enable verbose messages'
157 complete -c module -s s -l silent --description 'Turn off error, warning and informational messages'
158 complete -c module -s i -l icase --description 'Case insensitive match'
159 complete -c module -s t -l terse --description 'Display output in terse format'
160 complete -c module -s l -l long --description 'Display output in long format'
161 complete -c module -s j -l json --description 'Display output in JSON format'
162 complete -c module -s o -l output --description 'Define elements to output in addition to module names'
163 complete -c module -l output= --description 'Define elements to output in addition to module names'
164 complete -c module -l tag --description 'Apply tag to loading module'
165 complete -c module -l tag= --description 'Apply tag to loading module'
166 complete -c module -s a -l all --description 'Include hidden modules in search'
167 complete -c module -s d -l default --description 'Only show default versions available'
168 complete -c module -s L -l latest --description 'Only show latest versions available'
169 complete -c module -s S -l starts-with --description 'Search modules whose name begins with query string'
170 complete -c module -s C -l contains --description 'Search modules whose name contains query string'
171 complete -c module -l indepth --description 'Perform recursive avail search'
172 complete -c module -l no-indepth --description 'Perform non-recursive avail search'
173 complete -c module -l paginate --description 'Pipe mesg output into a pager if stream attached to terminal'
174 complete -c module -l no-pager --description 'Do not pipe message output into a pager'
175 complete -c module -l auto --description 'Enable automated module handling mode'
176 complete -c module -l no-auto --description 'Disable automated module handling mode'
177 complete -c module -s f -l force --description 'By-pass dependency consistency or confirmation dialog'
178 complete -c module -l color --description 'Colorize the output'
179 complete -c module -l color= --description 'Colorize the output'
180 complete -c module -s w -l width --description 'Set output width'
181 complete -c module -l width= --description 'Set output width'
182 complete -c module -l ignore-cache --description 'Ignore module cache'
183 complete -c module -l ignore-user-rc --description 'Skip evaluation of user-specific module rc file'