fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Daniel Rainerl10n: add Fluent localization system8816960b8

master
15.8 KiB441 linesraw
1complete -c help -n __fish_is_first_arg -x -a '(
2    {
3        status get-file help_sections |
4            string replace -r "^index(#|\$)" introduction\$1
5        printf cmds/%s\n ! . : \[ \{
6    } |
7        while read -l item
8            printf "%s\t%s\n" $item "$(__fish_help_describe $item)"
9        end
10)'
11
12function __fish_help_describe -a help_item
13    switch $help_item
14        case 'cmds/*'
15            echo (_ "Help for this command")
16        case commands
17            return
18        case commands#helper-commands
19            return
20        case commands#helper-functions
21            return
22        case commands#keywords
23            return
24        case commands#known-functions
25            return
26        case commands#the-full-list
27            return
28        case commands#tools
29            return
30        case completions
31            echo (_ "How to write completions")
32        case completions#useful-functions-for-writing-completions
33            echo (_ 'Useful functions for writing completions')
34        case completions#where-to-put-completions
35            echo (_ 'Where to put completions')
36        case contributing
37            return
38        case contributing#adding-translations-for-a-new-language
39            return
40        case contributing#code-style
41            return
42        case contributing#commit-history
43            return
44        case contributing#configuring-your-editor-for-fish-scripts
45            return
46        case contributing#contributing-completions
47            return
48        case contributing#contributing-documentation
49            return
50        case contributing#contributing-translations
51            return
52        case contributing#editing-ftl-files
53            return
54        case contributing#editing-po-files
55            return
56        case contributing#fish-script-style-guide
57            return
58        case contributing#github
59            return
60        case contributing#guidelines
61            return
62        case contributing#local-testing
63            return
64        case contributing#mailing-list
65            return
66        case contributing#minimum-supported-rust-version-msrv-policy
67            return
68        case contributing#modifications-to-strings-in-source-files-gettext-only
69            return
70        case contributing#modifying-existing-translations
71            return
72        case contributing#setting-code-up-for-translations
73            return
74        case contributing#testing
75            return
76        case contributing#updating-dependencies
77            return
78        case contributing#versioning
79            return
80        case design
81            return
82        case design#configurability-is-the-root-of-all-evil
83            return
84        case design#the-law-of-discoverability
85            return
86        case design#the-law-of-orthogonality
87            return
88        case design#the-law-of-responsiveness
89            return
90        case design#the-law-of-user-focus
91            return
92        case faq
93            echo (_ "Frequently Asked Questions")
94        case faq#fish-does-not-work-in-a-specific-terminal
95            return
96        case faq#how-do-i-change-the-greeting-message
97            return
98        case faq#how-do-i-check-whether-a-variable-is-defined
99            return
100        case faq#how-do-i-check-whether-a-variable-is-not-empty
101            return
102        case faq#how-do-i-customize-my-syntax-highlighting-colors
103            return
104        case faq#how-do-i-get-the-exit-status-of-a-command
105            return
106        case faq#how-do-i-run-a-command-every-login-what-s-fish-s-equivalent-to-bashrc-or-profile
107            return
108        case faq#how-do-i-run-a-command-from-history
109            return
110        case faq#how-do-i-run-a-subcommand-the-backtick-doesn-t-work
111            return
112        case faq#how-do-i-set-my-prompt
113            return
114        case faq#how-do-i-set-or-clear-an-environment-variable
115            return
116        case faq#i-m-getting-weird-graphical-glitches-a-staircase-effect-ghost-characters-cursor-in-the-wrong-position
117            return
118        case faq#my-command-pkg-config-gives-its-output-as-a-single-long-string
119            return
120        case faq#my-command-prints-no-matches-for-wildcard-but-works-in-bash
121            return
122        case faq#uninstalling-fish
123            return
124        case faq#what-is-the-equivalent-to-this-thing-from-bash-or-other-shells
125            return
126        case faq#why-does-my-prompt-show-a-i
127            return
128        case faq#why-doesn-t-history-substitution-etc-work
129            return
130        case faq#why-doesn-t-set-ux-exported-universal-variables-seem-to-work
131            return
132        case faq#why-won-t-ssh-scp-rsync-connect-properly-when-fish-is-my-login-shell
133            return
134        case fish_for_bash_users
135            echo (_ "Differences from bash")
136        case fish_for_bash_users#arithmetic-expansion
137            return
138        case fish_for_bash_users#blocks-and-loops
139            return
140        case fish_for_bash_users#builtins-and-other-commands
141            return
142        case fish_for_bash_users#command-substitutions
143            return
144        case fish_for_bash_users#heredocs
145            return
146        case fish_for_bash_users#other-facilities
147            return
148        case fish_for_bash_users#process-substitution
149            return
150        case fish_for_bash_users#prompts
151            echo (_ 'How to make your own prompt')
152        case fish_for_bash_users#quoting
153            echo (_ 'How "" and \'\' work')
154        case fish_for_bash_users#special-variables
155            return
156        case fish_for_bash_users#string-manipulation
157            return
158        case fish_for_bash_users#subshells
159            return
160        case fish_for_bash_users#test-test
161            return
162        case fish_for_bash_users#variable-defaults-my-variable-default-value
163            return
164        case fish_for_bash_users#variables
165            return
166        case fish_for_bash_users#wildcards-globs
167            return
168        case introduction
169            echo (_ Introduction)
170        case introduction#configuration
171            echo (_ 'Initialization files')
172        case introduction#default-shell
173            return
174        case introduction#examples
175            return
176        case introduction#installation
177            return
178        case introduction#other-help-pages
179            return
180        case introduction#resources
181            echo (_ 'Further help and development')
182        case introduction#setup
183            return
184        case introduction#shebang-line
185            return
186        case introduction#starting-and-exiting
187            return
188        case introduction#uninstalling
189            return
190        case introduction#where-to-go
191            return
192        case interactive
193            return
194        case interactive#abbreviations
195            return
196        case interactive#autosuggestions
197            echo (_ Autosuggestions)
198        case interactive#command-line-editor
199            echo (_ 'Command line editor')
200        case interactive#command-mode
201            echo (_ 'Command mode')
202        case interactive#configurable-greeting
203            echo (_ 'Configurable greeting')
204        case interactive#copy-and-paste-kill-ring
205            echo (_ 'Copy and paste (Kill Ring)')
206        case interactive#custom-bindings
207            return
208        case interactive#directory-stack
209            return
210        case interactive#emacs-mode-commands
211            echo (_ 'Emacs mode commands')
212        case interactive#help
213            return
214        case interactive#insert-mode
215            echo (_ 'Insert mode')
216        case interactive#key-sequences
217            return
218        case interactive#multiline-editing
219            echo (_ 'Multiline editing')
220        case interactive#navigating-directories
221            return
222        case interactive#pager-color-variables
223            echo (_ "How to color the pager")
224        case interactive#private-mode
225            return
226        case interactive#programmable-prompt
227            return
228        case interactive#programmable-title
229            echo (_ 'Programmable title')
230        case interactive#searchable-command-history
231            echo (_ 'Searchable history')
232        case interactive#shared-bindings
233            echo (_ 'Shared bindings')
234        case interactive#syntax-highlighting
235            echo (_ 'Setting syntax highlighting colors')
236        case interactive#syntax-highlighting-variables
237            echo (_ 'Variables for changing highlighting colors')
238        case interactive#tab-completion
239            echo (_ 'How tab-completion works')
240        case interactive#vi-mode-commands
241            return
242        case interactive#visual-mode
243            echo (_ 'Visual mode')
244        case language
245            return
246        case language#argument-handling
247            echo (_ "How to handle arguments")
248        case language#autoloading-functions
249            echo (_ "How functions are loaded")
250        case language#brace-expansion
251            echo (_ 'Brace expansion {a,b,c}')
252        case language#builtin-commands
253            echo (_ "An overview of fish's builtins")
254        case language#combiners-and-or
255            return
256        case language#combining-different-expansions
257            echo (_ "How different expansions work together")
258        case language#combining-lists
259            echo (_ 'Cartesian Products')
260        case language#combining-pipes-and-redirections
261            return
262        case language#command-lookup
263            return
264        case language#command-substitution
265            echo (_ "Command substitution")
266        case language#comments
267            echo (_ "# comments")
268        case language#conditions
269            echo (_ 'Conditional execution of code and flow control')
270        case language#configuration-files
271            return
272        case language#debugging-fish-scripts
273            echo (_ 'Debugging fish scripts')
274        case language#defining-aliases
275            echo (_ "How to define an alias")
276        case language#dereferencing-variables
277            return
278        case language#escaping-characters
279            echo (_ "How \\\\ escaping works")
280        case language#event-handlers
281            echo (_ 'Event handlers')
282        case language#exporting-variables
283            echo (_ 'Exporting variables')
284        case language#functions
285            echo (_ "How to define functions")
286        case language#future-feature-flags
287            return
288        case language#home-directory-expansion
289            echo (_ 'Home directory expansion ~USER')
290        case language#input-output-redirection
291            echo (_ 'Input/Output (IO) redirection')
292        case language#job-control
293            echo (_ 'Running multiple programs')
294        case language#lists
295            echo (_ "Variables with multiple elements")
296        case language#locale-variables
297            echo (_ 'Locale variables')
298        case language#loops-and-blocks
299            echo (_ "while, for and begin")
300        case language#overriding-variables-for-a-single-command
301            echo (_ "foo=bar variable overrides")
302        case language#parameter-expansion
303            echo (_ 'Parameter expansion (Globbing)')
304        case language#path-variables
305            echo (_ 'Why $PATH is special')
306        case language#piping
307            echo (_ Piping)
308        case language#profiling-fish-scripts
309            return
310        case language#querying-for-user-input
311            return
312        case language#quotes
313            echo (_ Quotes)
314        case language#quoting-variables
315            echo (_ 'How "" and \'\' work')
316        case language#shell-variable-and-function-names
317            echo (_ 'What characters are allowed in names')
318        case language#shell-variables
319            echo (_ 'Shell variables')
320        case language#slices
321            echo (_ 'Index range expansion')
322        case language#special-variables
323            echo (_ 'Special variables')
324        case language#syntax-overview
325            echo (_ 'Introduction to the fish syntax')
326        case language#table-of-operators
327            return
328        case language#terminology
329            echo (_ Terminology)
330        case language#the-if-statement
331            return
332        case language#the-status-variable
333            echo (_ '$status, the return code')
334        case language#the-switch-statement
335            return
336        case language#universal-variables
337            echo (_ 'More on universal variables')
338        case language#variable-expansion
339            echo (_ 'Variable expansion $VARNAME')
340        case language#variable-scope
341            echo (_ 'Variable scope')
342        case language#variables-as-command
343            return
344        case language#wildcards-globbing
345            echo (_ 'Wildcard expansion *.*')
346        case license
347            return
348        case license#gnu-library-general-public-license
349            return
350        case license#license-for-fish
351            return
352        case license#license-for-the-python-docs-theme
353            return
354        case license#mit-license
355            return
356        case prompt
357            echo (_ 'How to write your own prompt')
358        case prompt#adding-color
359            return
360        case prompt#formatting
361            return
362        case prompt#our-first-prompt
363            return
364        case prompt#save-the-prompt
365            return
366        case prompt#shortening-the-working-directory
367            return
368        case prompt#status
369            return
370        case prompt#transient-prompt
371            return
372        case prompt#where-to-go-from-here
373            return
374        case relnotes
375            echo (_ "Fish's release notes")
376        case terminal-compatibility
377            echo (_ "Terminal features used by fish")
378        case terminal-compatibility#dcs-commands-and-gnu-screen
379            return
380        case terminal-compatibility#optional-commands
381            return
382        case terminal-compatibility#required-commands
383            return
384        case terminal-compatibility#unicode-codepoints
385            return
386        case tutorial
387            echo (_ Tutorial)
388        case tutorial#autoloading-functions
389            echo (_ 'Autoloading Functions')
390        case tutorial#autosuggestions
391            echo (_ Autosuggestions)
392        case tutorial#combiners-and-or-not
393            echo (_ 'Combiners (And, Or, Not)')
394        case tutorial#command-substitutions
395            echo (_ 'Command Substitutions')
396        case tutorial#conditionals-if-else-switch
397            echo (_ 'Conditionals (If, Else, Switch)')
398        case tutorial#exit-status
399            echo (_ 'Exit Status')
400        case tutorial#exports-shell-variables
401            echo (_ 'Exports (Shell Variables)')
402        case tutorial#functions
403            echo (_ Functions)
404        case tutorial#getting-help
405            echo (_ 'Getting Help')
406        case tutorial#getting-started
407            return
408        case tutorial#learning-fish
409            echo (_ 'Learning fish')
410        case tutorial#lists
411            echo (_ Lists)
412        case tutorial#loops
413            echo (_ Loops)
414        case tutorial#path
415            echo (_ '$PATH')
416        case tutorial#pipes-and-redirections
417            echo (_ 'Pipes and Redirections')
418        case tutorial#prompt
419            echo (_ Prompt)
420        case tutorial#ready-for-more
421            echo (_ 'Ready for more?')
422        case tutorial#running-commands
423            echo (_ 'Running Commands')
424        case tutorial#separating-commands-semicolon
425            echo (_ 'Separating Commands (Semicolon)')
426        case tutorial#startup-where-s-bashrc
427            echo (_ "Startup (Where's .bashrc?)")
428        case tutorial#syntax-highlighting
429            echo (_ 'Syntax Highlighting')
430        case tutorial#tab-completions
431            echo (_ 'Tab Completions')
432        case tutorial#universal-variables
433            echo (_ 'Universal Variables')
434        case tutorial#variables
435            echo (_ Variables)
436        case tutorial#why-fish
437            echo (_ 'Why fish?')
438        case tutorial#wildcards
439            echo (_ Wildcards)
440    end
441end