File: commands.html

package info (click to toggle)
fish 4.2.1-3.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 35,976 kB
  • sloc: python: 6,972; javascript: 1,407; sh: 1,009; xml: 411; ansic: 230; objc: 78; makefile: 20
file content (434 lines) | stat: -rw-r--r-- 36,606 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
<!DOCTYPE html>

<html lang="en" data-content_root="./">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />

    <title>Commands &#8212; fish-shell 4.2.1 documentation</title>
    <link rel="stylesheet" type="text/css" href="_static/pygments.css?v=4da8bbd6" />
    <link rel="stylesheet" type="text/css" href="_static/pydoctheme.css?v=f89b4716" />
    <script src="_static/documentation_options.js?v=6fb65176"></script>
    <script src="_static/doctools.js?v=9bcbadda"></script>
    <script src="_static/sphinx_highlight.js?v=dc90522c"></script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="_ - call fish’s translations" href="cmds/_.html" />
    <link rel="prev" title="The fish language" href="language.html" />
    <link rel="shortcut icon" type="image/png" href="_static/fish.png" />
     

  </head><body><div id="fmain">  
    <div class="related" role="navigation" aria-label="Related">
      <h3>Navigation</h3>
      <ul>
    <li><img src="_static/fish.png" alt=""
             style="width: 80px; height: 80px; vertical-align: middle; margin-top: -1px"/></li>
    <li><a href="https://fishshell.com/">fish-shell</a> &#187;</li>
    
    <a href="index.html">fish-shell 4.2.1 documentation</a> &#187;
    

        <li class="nav-item nav-item-this"><a href="">Commands</a></li>
    <li class="right">
        

    <div class="inline-search" role="search">
        <form class="inline-search" action="search.html" method="get">
          <input placeholder="Quick search" type="text" name="q" />
          <input type="submit" value="Go" />
          <input type="hidden" name="check_keywords" value="yes" />
          <input type="hidden" name="area" value="default" />
        </form>
    </div>
    </li>
    
    <div id="old-docs-notice" style="display: none">
        This documents an old version of fish.
        <a href="../current/">See the latest release.</a>
    </div>

      </ul>
    </div>    

    <div class="document">
      <div class="sphinxsidebar" role="navigation" aria-label="Main">
        <div class="sphinxsidebarwrapper">
<div>
<h3><a href="index.html">Documents</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="index.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="faq.html">Frequently asked questions</a></li>
<li class="toctree-l1"><a class="reference internal" href="interactive.html">Interactive use</a></li>
<li class="toctree-l1"><a class="reference internal" href="language.html">The fish language</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Commands</a></li>
<li class="toctree-l1"><a class="reference internal" href="fish_for_bash_users.html">Fish for bash users</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorial.html">Tutorial</a></li>
<li class="toctree-l1"><a class="reference internal" href="completions.html">Writing your own completions</a></li>
<li class="toctree-l1"><a class="reference internal" href="prompt.html">Writing your own prompt</a></li>
<li class="toctree-l1"><a class="reference internal" href="design.html">Design</a></li>
<li class="toctree-l1"><a class="reference internal" href="relnotes.html">Release notes</a></li>
<li class="toctree-l1"><a class="reference internal" href="terminal-compatibility.html">Terminal Compatibility</a></li>
<li class="toctree-l1"><a class="reference internal" href="contributing.html">Contributing To Fish</a></li>
<li class="toctree-l1"><a class="reference internal" href="license.html">License</a></li>
</ul>

</div>
<search id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
      <input type="submit" value="Go" />
    </form>
    </div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script>
<div>
<h4><a href="index.html">Sections</a></h4>
<ul>
<li><a class="reference internal" href="#">Commands</a><ul>
<li><a class="reference internal" href="#keywords">Keywords</a></li>
<li><a class="reference internal" href="#tools">Tools</a></li>
<li><a class="reference internal" href="#known-functions">Known functions</a></li>
<li><a class="reference internal" href="#helper-functions">Helper functions</a></li>
<li><a class="reference internal" href="#helper-commands">Helper commands</a></li>
<li><a class="reference internal" href="#the-full-list">The full list</a></li>
</ul>
</li>
</ul>

</div>
        </div>
      </div>
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <section id="commands">
<h1>Commands<a class="headerlink" href="#commands" title="Link to this heading">¶</a></h1>
<p>This is a list of all the commands fish ships with.</p>
<p>Broadly speaking, these fall into a few categories:</p>
<section id="keywords">
<h2>Keywords<a class="headerlink" href="#keywords" title="Link to this heading">¶</a></h2>
<p>Core language keywords that make up the syntax, like</p>
<ul class="simple">
<li><p><a class="reference internal" href="cmds/if.html"><span class="doc">if</span></a> and <a class="reference internal" href="cmds/else.html"><span class="doc">else</span></a> for conditions.</p></li>
<li><p><a class="reference internal" href="cmds/for.html"><span class="doc">for</span></a> and <a class="reference internal" href="cmds/while.html"><span class="doc">while</span></a> for loops.</p></li>
<li><p><a class="reference internal" href="cmds/break.html"><span class="doc">break</span></a> and <a class="reference internal" href="cmds/continue.html"><span class="doc">continue</span></a> to control loops.</p></li>
<li><p><a class="reference internal" href="cmds/function.html"><span class="doc">function</span></a> to define functions.</p></li>
<li><p><a class="reference internal" href="cmds/return.html"><span class="doc">return</span></a> to return a status from a function.</p></li>
<li><p><a class="reference internal" href="cmds/begin.html"><span class="doc">begin</span></a> to begin a block and <a class="reference internal" href="cmds/end.html"><span class="doc">end</span></a> to end any block (including ifs and loops).</p></li>
<li><p><a class="reference internal" href="cmds/and.html"><span class="doc">and</span></a>, <a class="reference internal" href="cmds/or.html"><span class="doc">or</span></a> and <a class="reference internal" href="cmds/not.html"><span class="doc">not</span></a> to combine commands logically.</p></li>
<li><p><a class="reference internal" href="cmds/switch.html"><span class="doc">switch</span></a> and <a class="reference internal" href="cmds/case.html"><span class="doc">case</span></a> to make multiple blocks depending on the value of a variable.</p></li>
<li><p><a class="reference internal" href="cmds/command.html"><span class="doc">command</span></a> or <a class="reference internal" href="cmds/builtin.html"><span class="doc">builtin</span></a> to tell fish what sort of thing to execute</p></li>
<li><p><a class="reference internal" href="cmds/time.html"><span class="doc">time</span></a> to time execution</p></li>
<li><p><a class="reference internal" href="cmds/exec.html"><span class="doc">exec</span></a> tells fish to replace itself with a command.</p></li>
<li><p><a class="reference internal" href="cmds/end.html"><span class="doc">end</span></a> to end a block</p></li>
</ul>
</section>
<section id="tools">
<h2>Tools<a class="headerlink" href="#tools" title="Link to this heading">¶</a></h2>
<p>Builtins to do a task, like</p>
<ul class="simple">
<li><p><a class="reference internal" href="cmds/cd.html"><span class="doc">cd</span></a> to change the current directory.</p></li>
<li><p><a class="reference internal" href="cmds/echo.html"><span class="doc">echo</span></a> or <a class="reference internal" href="cmds/printf.html"><span class="doc">printf</span></a> to produce output.</p></li>
<li><p><a class="reference internal" href="cmds/set_color.html"><span class="doc">set_color</span></a> to colorize output.</p></li>
<li><p><a class="reference internal" href="cmds/set.html"><span class="doc">set</span></a> to set, query or erase variables.</p></li>
<li><p><a class="reference internal" href="cmds/read.html"><span class="doc">read</span></a> to read input.</p></li>
<li><p><a class="reference internal" href="cmds/string.html"><span class="doc">string</span></a> for string manipulation.</p></li>
<li><p><a class="reference internal" href="cmds/path.html"><span class="doc">path</span></a> for filtering paths and handling their components.</p></li>
<li><p><a class="reference internal" href="cmds/math.html"><span class="doc">math</span></a> does arithmetic.</p></li>
<li><p><a class="reference internal" href="cmds/argparse.html"><span class="doc">argparse</span></a> to make arguments easier to handle.</p></li>
<li><p><a class="reference internal" href="cmds/count.html"><span class="doc">count</span></a> to count arguments.</p></li>
<li><p><a class="reference internal" href="cmds/type.html"><span class="doc">type</span></a> to find out what sort of thing (command, builtin or function) fish would call, or if it exists at all.</p></li>
<li><p><a class="reference internal" href="cmds/test.html"><span class="doc">test</span></a> checks conditions like if a file exists or a string is empty.</p></li>
<li><p><a class="reference internal" href="cmds/contains.html"><span class="doc">contains</span></a> to see if a list contains an entry.</p></li>
<li><p><a class="reference internal" href="cmds/eval.html"><span class="doc">eval</span></a> and <a class="reference internal" href="cmds/source.html"><span class="doc">source</span></a> to run fish code from a string or file.</p></li>
<li><p><a class="reference internal" href="cmds/status.html"><span class="doc">status</span></a> to get shell information, like whether it’s interactive or a login shell, or which file it is currently running.</p></li>
<li><p><a class="reference internal" href="cmds/abbr.html"><span class="doc">abbr</span></a> manages <a class="reference internal" href="interactive.html#abbreviations"><span class="std std-ref">Abbreviations</span></a>.</p></li>
<li><p><a class="reference internal" href="cmds/bind.html"><span class="doc">bind</span></a> to change bindings.</p></li>
<li><p><a class="reference internal" href="cmds/complete.html"><span class="doc">complete</span></a> manages <a class="reference internal" href="interactive.html#tab-completion"><span class="std std-ref">completions</span></a>.</p></li>
<li><p><a class="reference internal" href="cmds/commandline.html"><span class="doc">commandline</span></a> to get or change the commandline contents.</p></li>
<li><p><a class="reference internal" href="cmds/fish_config.html"><span class="doc">fish_config</span></a> to easily change fish’s configuration, like the prompt or colorscheme.</p></li>
<li><p><a class="reference internal" href="cmds/random.html"><span class="doc">random</span></a> to generate random numbers or pick from a list.</p></li>
</ul>
</section>
<section id="known-functions">
<h2>Known functions<a class="headerlink" href="#known-functions" title="Link to this heading">¶</a></h2>
<p>Known functions are a customization point. You can change them to change how your fish behaves. This includes:</p>
<ul class="simple">
<li><p><a class="reference internal" href="cmds/fish_prompt.html"><span class="doc">fish_prompt</span></a> and <a class="reference internal" href="cmds/fish_right_prompt.html"><span class="doc">fish_right_prompt</span></a> and <a class="reference internal" href="cmds/fish_mode_prompt.html"><span class="doc">fish_mode_prompt</span></a> to print your prompt.</p></li>
<li><p><a class="reference internal" href="cmds/fish_command_not_found.html"><span class="doc">fish_command_not_found</span></a> to tell fish what to do when a command is not found.</p></li>
<li><p><a class="reference internal" href="cmds/fish_title.html"><span class="doc">fish_title</span></a> to change the terminal’s title.</p></li>
<li><p><a class="reference internal" href="cmds/fish_tab_title.html"><span class="doc">fish_tab_title</span></a> to change the terminal tab’s title.</p></li>
<li><p><a class="reference internal" href="cmds/fish_greeting.html"><span class="doc">fish_greeting</span></a> to show a greeting when fish starts.</p></li>
<li><p><a class="reference internal" href="cmds/fish_should_add_to_history.html"><span class="doc">fish_should_add_to_history</span></a> to determine if a command should be added to history</p></li>
</ul>
</section>
<section id="helper-functions">
<h2>Helper functions<a class="headerlink" href="#helper-functions" title="Link to this heading">¶</a></h2>
<p>Some helper functions, often to give you information for use in your prompt:</p>
<ul class="simple">
<li><p><a class="reference internal" href="cmds/fish_git_prompt.html"><span class="doc">fish_git_prompt</span></a> and <a class="reference internal" href="cmds/fish_hg_prompt.html"><span class="doc">fish_hg_prompt</span></a> to print information about the current git or mercurial repository.</p></li>
<li><p><a class="reference internal" href="cmds/fish_vcs_prompt.html"><span class="doc">fish_vcs_prompt</span></a> to print information for either.</p></li>
<li><p><a class="reference internal" href="cmds/fish_svn_prompt.html"><span class="doc">fish_svn_prompt</span></a> to print information about the current svn repository.</p></li>
<li><p><a class="reference internal" href="cmds/fish_status_to_signal.html"><span class="doc">fish_status_to_signal</span></a> to give a signal name from a return status.</p></li>
<li><p><a class="reference internal" href="cmds/prompt_pwd.html"><span class="doc">prompt_pwd</span></a> to give the current directory in a nicely formatted and shortened way.</p></li>
<li><p><a class="reference internal" href="cmds/prompt_login.html"><span class="doc">prompt_login</span></a> to describe the current login, with user and hostname, and to explain if you are in a chroot or connected via ssh.</p></li>
<li><p><a class="reference internal" href="cmds/prompt_hostname.html"><span class="doc">prompt_hostname</span></a> to give the hostname, shortened for use in the prompt.</p></li>
<li><p><a class="reference internal" href="cmds/fish_is_root_user.html"><span class="doc">fish_is_root_user</span></a> to check if the current user is an administrator user like root.</p></li>
<li><p><a class="reference internal" href="cmds/fish_add_path.html"><span class="doc">fish_add_path</span></a> to easily add a path to $PATH.</p></li>
<li><p><a class="reference internal" href="cmds/alias.html"><span class="doc">alias</span></a> to quickly define wrapper functions (“aliases”).</p></li>
<li><p><a class="reference internal" href="cmds/fish_delta.html"><span class="doc">fish_delta</span></a> to show what you have changed from the default configuration.</p></li>
<li><p><a class="reference internal" href="cmds/export.html"><span class="doc">export</span></a> as a compatibility function for other shells.</p></li>
</ul>
</section>
<section id="helper-commands">
<h2>Helper commands<a class="headerlink" href="#helper-commands" title="Link to this heading">¶</a></h2>
<p>fish also ships some things as external commands so they can be easily called from elsewhere.</p>
<p>This includes <a class="reference internal" href="cmds/fish_indent.html"><span class="doc">fish_indent</span></a> to format fish code and <a class="reference internal" href="cmds/fish_key_reader.html"><span class="doc">fish_key_reader</span></a> to show you what escape sequence a keypress produces.</p>
</section>
<section id="the-full-list">
<h2>The full list<a class="headerlink" href="#the-full-list" title="Link to this heading">¶</a></h2>
<p>And here is the full list:</p>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="cmds/_.html">_ - call fish’s translations</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/abbr.html">abbr - manage fish abbreviations</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/alias.html">alias - create a function</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/and.html">and - conditionally execute a command</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/argparse.html">argparse - parse options passed to a fish script or function</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/begin.html">begin - start a new block of code</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/bg.html">bg - send jobs to background</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/bind.html">bind - handle fish key bindings</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/block.html">block - temporarily block delivery of events</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/break.html">break - stop the current inner loop</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/breakpoint.html">breakpoint - launch debug mode</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/builtin.html">builtin - run a builtin command</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/case.html">case - conditionally execute a block of commands</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/cd.html">cd - change directory</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/cdh.html">cdh - change to a recently visited directory</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/command.html">command - run a program</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/commandline.html">commandline - set or get the current command line buffer</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/complete.html">complete - edit command-specific tab-completions</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/contains.html">contains - test if a word is present in a list</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/continue.html">continue - skip the remainder of the current iteration of the current inner loop</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/count.html">count - count the number of elements of a list</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/dirh.html">dirh - print directory history</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/dirs.html">dirs - print directory stack</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/disown.html">disown - remove a process from the list of jobs</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/echo.html">echo - display a line of text</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/else.html">else - execute command if a condition is not met</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/emit.html">emit - emit a generic event</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/end.html">end - end a block of commands</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/eval.html">eval - evaluate the specified commands</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/exec.html">exec - execute command in current process</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/exit.html">exit - exit the shell</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/export.html">export - compatibility function for exporting variables</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/false.html">false - return an unsuccessful result</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fg.html">fg - bring job to foreground</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fish.html">fish - the friendly interactive shell</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fish_add_path.html">fish_add_path - add to the path</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fish_breakpoint_prompt.html">fish_breakpoint_prompt - define the prompt when stopped at a breakpoint</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fish_clipboard_copy.html">fish_clipboard_copy - copy text to the system’s clipboard</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fish_clipboard_paste.html">fish_clipboard_paste - get text from the system’s clipboard</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fish_command_not_found.html">fish_command_not_found - what to do when a command wasn’t found</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fish_config.html">fish_config - start the web-based configuration interface</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fish_default_key_bindings.html">fish_default_key_bindings - set emacs key bindings for fish</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fish_delta.html">fish_delta - compare functions and completions to the default</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fish_git_prompt.html">fish_git_prompt - output git information for use in a prompt</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fish_greeting.html">fish_greeting - display a welcome message in interactive shells</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fish_hg_prompt.html">fish_hg_prompt - output Mercurial information for use in a prompt</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fish_indent.html">fish_indent - indenter and prettifier</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fish_is_root_user.html">fish_is_root_user - check if the current user is root</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fish_key_reader.html">fish_key_reader - explore what characters keyboard keys send</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fish_mode_prompt.html">fish_mode_prompt - define the appearance of the mode indicator</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fish_opt.html">fish_opt - create an option specification for the argparse command</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fish_prompt.html">fish_prompt - define the appearance of the command line prompt</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fish_right_prompt.html">fish_right_prompt - define the appearance of the right-side command line prompt</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fish_should_add_to_history.html">fish_should_add_to_history - decide whether a command should be added to the history</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fish_status_to_signal.html">fish_status_to_signal - convert exit codes to human-friendly signals</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fish_svn_prompt.html">fish_svn_prompt - output Subversion information for use in a prompt</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fish_tab_title.html">fish_tab_title - define the terminal tab’s title</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fish_title.html">fish_title - define the terminal’s title</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fish_title.inc.html">Synopsis</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fish_title.inc.html#description">Description</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fish_title.inc.html#example">Example</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fish_update_completions.html">fish_update_completions - update completions using manual pages</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fish_vcs_prompt.html">fish_vcs_prompt - output version control system information for use in a prompt</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/fish_vi_key_bindings.html">fish_vi_key_bindings - set vi key bindings for fish</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/for.html">for - perform a set of commands multiple times</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/funced.html">funced - edit a function interactively</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/funcsave.html">funcsave - save the definition of a function to the user’s autoload directory</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/function.html">function - create a function</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/functions.html">functions - print or erase functions</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/help.html">help - display fish documentation</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/history.html">history - show and manipulate command history</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/if.html">if - conditionally execute a command</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/isatty.html">isatty - test if a file descriptor is a terminal</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/jobs.html">jobs - print currently running jobs</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/math.html">math - perform mathematics calculations</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/nextd.html">nextd - move forward through directory history</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/not.html">not - negate the exit status of a job</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/open.html">open - open file in its default application</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/or.html">or - conditionally execute a command</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/path.html">path - manipulate and check paths</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/popd.html">popd - move through directory stack</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/prevd.html">prevd - move backward through directory history</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/printf.html">printf - display text according to a format string</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/prompt_hostname.html">prompt_hostname - print the hostname, shortened for use in the prompt</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/prompt_login.html">prompt_login - describe the login suitable for prompt</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/prompt_pwd.html">prompt_pwd - print pwd suitable for prompt</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/psub.html">psub - perform process substitution</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/pushd.html">pushd - push directory to directory stack</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/pwd.html">pwd - output the current working directory</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/random.html">random - generate random number</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/read.html">read - read line of input into variables</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/realpath.html">realpath - convert a path to an absolute path without symlinks</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/return.html">return - stop the current inner function</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/set.html">set - display and change shell variables</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/set_color.html">set_color - set the terminal color</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/source.html">source - evaluate contents of file</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/status.html">status - query fish runtime information</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/string.html">string - manipulate strings</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/string-collect.html">string-collect - join strings into one</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/string-escape.html">string-escape - escape special characters</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/string-join.html">string-join - join strings with delimiter</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/string-join0.html">string-join0 - join strings with zero bytes</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/string-length.html">string-length - print string lengths</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/string-lower.html">string-lower - convert strings to lowercase</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/string-match.html">string-match - match substrings</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/string-pad.html">string-pad - pad strings to a fixed width</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/string-repeat.html">string-repeat - multiply a string</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/string-replace.html">string-replace - replace substrings</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/string-shorten.html">string-shorten - shorten strings to a width, with an ellipsis</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/string-split.html">string-split - split strings by delimiter</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/string-split0.html">string-split0 - split on zero bytes</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/string-sub.html">string-sub - extract substrings</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/string-trim.html">string-trim - remove trailing whitespace</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/string-unescape.html">string-unescape - expand escape sequences</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/string-upper.html">string-upper - convert strings to uppercase</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/suspend.html">suspend - suspend the current shell</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/switch.html">switch - conditionally execute a block of commands</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/test.html">test - perform tests on files and text</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/time.html">time - measure how long a command or block takes</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/trap.html">trap - perform an action when the shell receives a signal</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/true.html">true - return a successful result</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/type.html">type - locate a command and describe its type</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/ulimit.html">ulimit - set or get resource usage limits</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/umask.html">umask - set or get the file creation mode mask</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/vared.html">vared - interactively edit the value of an environment variable</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/wait.html">wait - wait for jobs to complete</a></li>
<li class="toctree-l1"><a class="reference internal" href="cmds/while.html">while - perform a set of commands multiple times</a></li>
</ul>
</div>
</section>
</section>


            <div class="clearer"></div>
          </div>
        </div>
      </div> 
      <div class="clearer"></div>
    </div>  
    <div class="related" role="navigation" aria-label="Related">
      <h3>Navigation</h3>
      <ul>
    <li><img src="_static/fish.png" alt=""
             style="width: 80px; height: 80px; vertical-align: middle; margin-top: -1px"/></li>
    <li><a href="https://fishshell.com/">fish-shell</a> &#187;</li>
    
    <a href="index.html">fish-shell 4.2.1 documentation</a> &#187;
    

        <li class="nav-item nav-item-this"><a href="">Commands</a></li>
    <li class="right">
        

    <div class="inline-search" role="search">
        <form class="inline-search" action="search.html" method="get">
          <input placeholder="Quick search" type="text" name="q" />
          <input type="submit" value="Go" />
          <input type="hidden" name="check_keywords" value="yes" />
          <input type="hidden" name="area" value="default" />
        </form>
    </div>
    </li>
    
    <div id="old-docs-notice" style="display: none">
        This documents an old version of fish.
        <a href="../current/">See the latest release.</a>
    </div>

      </ul>
    </div>  
    <div class="footer">
    &copy; Copyright fish-shell developers.
    <br />
    <a href="https://github.com/fish-shell/fish-shell/issues">Found a bug</a>?
    <br />

    Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 8.2.3.
    </div>
</div>

<script type="text/javascript">
 FISH_DOCS_VERSION = "4.2";

 function copy_to_clipboard(it) {
     // Find the pre tag we're interested in.
     var pre = it.target;
     while (pre.tagName != "PRE") pre = pre.parentNode;
     var txt = "";
     // Cheesy: If we have a prompt,
     // we only copy prompted lines,
     // by splitting and matching and stuff
     if (pre.querySelector('span.gp')) {
         var texts= [];
         for (var line of pre.innerText.split('\n')) {
             if (line.match(/^>_?.*/)) {
                 texts.push(line.replace(/^>_?/, ""));
             }
         }
         txt = texts.join("\n");
     } else {
         // Even cheesier: If we don't have a prompt, we remove the button text from the end.
         var txt = pre.innerText.substring(0, pre.innerText.length - it.target.innerText.length).trim();
     }

     navigator.clipboard.writeText(txt).then(function() {
         // Success - set the text to indicate it,
         // then set it back after 2 seconds.
         var span = pre.querySelector("button span");
         if (span) {
             var oldText = span.innerText;
             span.innerText = "COPIED!";
             setTimeout(function() {
                 span.innerText = oldText;
             }, 2000);
         }
     }, function() {
     });
 }

  (function () {
      // Add copy buttons to all the codeblocks.
      var codeblocks = document.querySelectorAll('div > pre');

      var button = document.createElement('button');
      var span = document.createElement('span');
      span.innerText = "COPY";
      button.appendChild(span);

      for (var i of codeblocks) {
          var newButton = button.cloneNode(true);
          newButton.addEventListener('click', copy_to_clipboard);
          i.appendChild(newButton);
      }
  })();
</script>

  </body>
</html>