Fabian Homborg
616cd38d8e
docs: Don't use force-repaint
...
It's not needed here and misleading. force-repaint isn't all that
useful and especially not something for a simple example.
2020-08-07 21:06:16 +02:00
Carlos Alexandro Becker
ef8c397e7b
docs: fix small formatting issues
2020-08-07 22:05:05 +08:00
Soumya
a2b2bcef6e
Add a $status_generation
variable that's incremented for each interactive command that produces a status.
...
This can be used to determine whether the previous command produced a real status, or just carried over the status from the command before it. Backgrounded commands and variable assignments will not increment status_generation, all other commands will.
2020-08-05 12:23:49 -07:00
Johannes Altmanninger
242b60fdef
history.rst: clarify that "history search" is the default command
2020-08-04 21:44:26 +02:00
ridiculousfish
af48d09ca6
Improve syntax highlighting variable docs
...
Make them a table instead of a list, which renders more nicely.
Shorten some of the descriptions.
2020-08-03 13:21:37 -07:00
ridiculousfish
201ca02893
Remove an errant space from the docs
...
Corrects fish_pager_color_secondary_prefix
2020-08-03 12:19:57 -07:00
Charles Gould
2740473a65
docs: use parsed-literal to highlight interactive examples
...
There are a few code blocks where the default highlighting does not
work and the documentation looks bad as a result. Usually this happens
when we are demonstrating an important interactive feature, such as
autosuggestions, syntax highlighting, or tab completion.
The pygments highlighter was not designed for code samples like these.
But it is important to show the behavior clearly in the docs. I am
attempting to make these weird examples look as much like the "normal"
code blocks as possible.
https://docutils.sourceforge.io/docs/ref/rst/directives.html#parsed-literal
2020-08-02 14:22:29 -07:00
Olivier FAURE
e7f0b5801d
Add forward-single-char input command
...
This allows users to add custom keybindings to autocomplete only one
character at a time.
Resolves https://github.com/fish-shell/fish-shell/issues/4984
2020-08-01 12:09:31 +02:00
Olivier FAURE
6778d04aa5
Add or
keybind input function
2020-08-01 12:09:31 +02:00
ridiculousfish
1c2323e76f
Use dashes instead of underscores pervasively in tutorial anchors
...
This fixes some broken help completions.
2020-07-31 12:10:16 -07:00
ridiculousfish
c940af1600
Correct tut_combiners anchor to tut-combiners
...
dash is preferred in the tutorial. This fixes a broken link from the main
help page.
2020-07-31 11:53:47 -07:00
Fabian Homborg
6356912702
docs: Expand background section
...
It's not entirely clear why there's two sections right now, tbh.
[ci skip]
2020-07-26 17:33:11 +02:00
Fabian Homborg
50a40175f1
docs: More on conditionals directly
...
It's weird to force people to go to the separate pages, at least give
some simple examples here and link to the tutorial.
[ci skip]
2020-07-26 17:33:11 +02:00
Fabian Homborg
cbd3adaa63
docs: Mention psub in the command substitution chapter
...
[ci skip]
2020-07-26 17:33:10 +02:00
Fabian Homborg
65f932edd2
docs: Also mention functions
and type
...
One of the nicest things about fish is how introspectable it is. We
should probably get people to just mess around and see what is
implemented how. This is a step in that direction.
[ci skip]
2020-07-23 22:27:32 +02:00
Fabian Homborg
b485daa987
docs: Rewrite "Functions" section
...
More examples, links to funced/funcsave, autoloading, wrappers
[ci skip]
2020-07-23 17:49:43 +02:00
Charles Gould
f1302d336a
docs: fix a few links
...
- add missing links for some commands (control flow section)
- fix broken links that use the old syntax (#tut_ links)
- miscellaneous fixing of backticks/emphasis
2020-07-18 20:46:50 +02:00
Fabian Homborg
82de51b9d3
Document adding bindings
...
This was never made explicit.
[ci skip]
2020-07-16 17:47:35 +02:00
Charles Gould
14ccac4887
docs: fix broken links in FAQ
2020-07-16 17:10:36 +02:00
Charles Gould
cea941a061
docs: fix literals in quotes section
2020-07-16 17:10:36 +02:00
Charles Gould
a83f580174
docs: shebang line cleanup
2020-07-16 17:10:36 +02:00
Charles Gould
49c575c3a5
docs: executing bash addition
2020-07-16 17:10:36 +02:00
Charles Gould
e5ac2fa879
docs: default shell formatting
2020-07-16 17:10:36 +02:00
blinry
b178f0921e
Rephrase confusing display of key binding in documentation
...
The binding Alt+., followed by a full stop, wasn't ideal. Rephrase the sentence to avoid that.
2020-07-14 20:29:14 +02:00
blinry
641f1b00e4
Fix link target for "other features"
...
Seems the link targets need a blank line above them, otherwise they will be rendered into the document.
2020-07-14 20:28:45 +02:00
Fabian Homborg
8a6a265c3e
docs: Add word splitting example
2020-07-09 18:35:41 +02:00
David Adam
4a35248465
docs/bind: make list formatting consistent
2020-07-06 20:50:19 +08:00
David Adam
1b121bd9a6
docs/jobs: add example output and remove spurious header
2020-07-06 20:48:13 +08:00
Gokul Soumya
6212a584a7
docs/jobs: Header is stripped in command substitution
2020-07-04 13:25:17 +02:00
Fabian Homborg
eb35975c0f
Make cancel-commandline actual bind function
...
This was always awkward as fish script, and had problems with
interrupting the autoloading.
Note that we still leave the old function intact to facilitate easier
upgrading for now.
Fixes #7145 .
2020-07-01 20:56:56 +02:00
Johannes Altmanninger
8b961a0ca8
Bind undo to Control-Z in addition to Control-/
...
See #7152
2020-07-01 00:40:32 +02:00
Jeff Cook
b27440d536
Fix paste-o that duplicated documentation header.
2020-06-30 23:45:41 +02:00
Aadi Bajpai
7c5b19ec2c
Change natural number to non-negative integer ( #7161 )
...
* natural → whole
* positive whole
* positive whole number → non-negative integer
2020-06-29 20:26:53 +02:00
Daniel Bengtsson
e2f03fa8a7
Add a function to check if the user is root.
...
Add a helper function to check if the user is root. This function can be
useful for the prompts for example. Modify the prompts made root checked
to use the function instead. Add also the support of Administrator like
a root user.
Fixes : #7031
2020-06-26 21:25:13 +02:00
Daniel Bengtsson
b8d0de1b88
Typo.
...
Replace the tabulation by space.
2020-06-20 18:17:11 +02:00
Fabian Homborg
c5f06cde82
docs/string: Fix match examples
...
One was just cosmetic (too many \\), one was actually broken because
it had duplicated `{{`, possibly resulting from the doxygen conversion?
[ci skip]
2020-06-19 21:23:51 +02:00
Fabian Homborg
547f649797
docs: Slight reword of argparse's optional argument section
...
[ci skip]
2020-06-17 15:36:50 +02:00
David Adam
7838b47e6b
docs: formatting fixes in initialization section
2020-06-15 21:46:20 +08:00
David Adam
5dd7944d0b
faq: add SSH/SFTP/SCP interactive guard suggestions
...
See #2160 , #2405 , #3742 , #4432 & #4745 , among others.
2020-06-15 21:46:20 +08:00
Fabian Homborg
d9b0a3b272
Revert "docs/tutorial: Fix duplicate sentence"
...
This reverts commit 9d1129f14c
.
Probably a bad rebase, at the time this appeared on master the sentence was already removed.
2020-06-11 18:40:35 +02:00
Fabian Homborg
5cae62a266
docs: Document comments
...
Turns out they weren't.
Fixes #7106 .
2020-06-10 17:39:04 +02:00
Fabian Homborg
e094e770e8
docs: Some more work on fish_for_bash_users
...
[ci skip]
2020-06-08 20:44:56 +02:00
Fabian Homborg
7791457bbb
docs: Add string-collect link
2020-06-07 20:04:31 +02:00
Fabian Homborg
a6e4e082b7
docs: Include "fish for bash users" document
...
Not 100% done, but it should be okay as an overview.
Fixes #2382 .
2020-06-07 20:04:05 +02:00
Mikel Ward
96425d2231
Fix string collect examples
...
collect -N leaves the trailing newline, not the other way around.
2020-06-07 19:33:27 +02:00
Awal Garg
cb5eb72c6b
Skip pre/post exec events for empty commands ( #4829 )
2020-06-06 16:31:33 -07:00
David Adam
c5e535e794
docs: link and explicit instructions on creating a blank fish_mode_prompt
...
Work on #5783 .
[ci skip]
2020-06-06 22:52:13 +08:00
Fabian Homborg
ab2db135ba
docs: Add first draft of fish-vs-bash
...
That name's probably not the correct one.
The idea is to have a quick primer document for people coming from bash.
2020-06-05 19:19:23 +02:00
Fabian Homborg
801ab95fd0
docs: Explain $XDG_CONFIG_HOME
2020-06-05 19:18:09 +02:00
Fabian Homborg
77fc83c293
docs: Reword history substitution
...
That prepend-sudo note was a bit awkward. I'm still not super happy
with it, but it should be better.
Also remove the "simple but effective" comment.
2020-06-05 19:17:19 +02:00
Fabian Homborg
e646285bcb
Let __fish_prepend_sudo
use the last commandline if there is no current one ( #7079 )
...
* docs/faq: Mention prepend_sudo
[ci skip]
* __fish_prepend_sudo: Use $history[1] if commandline is empty
Currently, if you press alt+s with an empty commandline, it inserts
"sudo", which seems fairly useless.
Now, it inserts "sudo " followed by the last history entry, which
makes it a replacement for `sudo !!`.
* docs
2020-06-04 18:25:02 +02:00
Fabian Homborg
44184f68e4
Add status dirname
and status basename
convenience commands
...
There's a terrible number of fishscripts that start with
set path (dirname (status filename))
And that's really just a bit boring.
So let's let it be
set path (status dirname)
2020-06-04 18:23:32 +02:00
Fabian Homborg
5efe1a09ce
docs/argparse: Add note on optional arguments
...
Yeah I had to answer this one again.
[ci skip]
2020-06-04 17:28:02 +02:00
Fabian Homborg
99c2c599f3
docs: Mention that reloading can take a bit
...
Fixes #7064 .
2020-05-30 10:07:21 +02:00
Fabian Homborg
4f6851b19f
Add CHANGELOG to the docs
...
This uses a cheesy trampoline file, but it seems to work alright.
2020-05-30 10:07:21 +02:00
Fabian Homborg
4785440f65
Add an "_" builtin to call into gettext ( #7036 )
...
* Add an "_" builtin to call into gettext
We already have gettext in C++ (if available), so it seems weird to
fork off a command to start it from script.
This is only for fish's own translations. There's no way to call into
other catalogs, it just translates all arguments separately.
This is faster by a factor of ~1000, which allows us to call
translations much more, especially from scripts.
E.g. making fish_greeting global by default would hurt cost-wise,
given that my fish starts up in 8ms and just calling the current `_`
function takes 2ms, and that would have two calls.
Incidentally, this also makes us rely on a weirdly defined function
less, so it:
Fixes #6804 .
* docs: Add `_` docs
Let's see if that filename works out.
* Reword _ docs
2020-05-29 20:53:44 +02:00
Fabian Homborg
1e17a68133
docs/tutorial: Recommend fish_add_path over $fish_user_paths
2020-05-29 20:51:09 +02:00
Fabian Homborg
9354dd6971
Add fish_add_path, a simple way to add to $PATH
...
This is a function you can either execute once, interactively, or
stick in config.fish, and it will do the right thing.
Some options are included to choose some slightly different behavior,
like setting $PATH directly instead of $fish_user_paths, or moving
already existing components to the front/back instead of ignoring
them, or appending new components instead of prepending them.
The defaults were chosen because they are the most safe, and
especially because they allow it to be idempotent - running it again
and again and again won't change anything, it won't even run the
actual `set` because it skips that if all components are already in.
Fixes #6960 .
2020-05-29 20:51:05 +02:00
Jason
90b9dd3627
Reword sentence
2020-05-28 17:39:37 +02:00
Donovan
bc2eb383d4
Funcsave with --directory option ( #7041 )
...
* funcsave: add option --directory
Signed-off-by: Donovan Jean <commit@dkrm.dev>
* funcsave: fix synopsis
Signed-off-by: Donovan Jean <commit@dkrm.dev>
* funcsave: fix completion
Signed-off-by: Donovan Jean <commit@dkrm.dev>
* funcsave: fix error message
Signed-off-by: Donovan Jean <commit@dkrm.dev>
* funcsave: fix parameter expansion
Signed-off-by: Donovan Jean <commit@dkrm.dev>
2020-05-27 20:13:44 +02:00
Fabian Homborg
2f7ac8767e
Fix wordo
...
English! It's a thing!
[ci skip]
2020-05-27 18:12:56 +02:00
Fabian Homborg
1dfc701ec6
docs: Slight rewording on the unmatched globs faq
...
[ci skip]
2020-05-27 18:11:59 +02:00
Fabian Homborg
ec267a1d54
Document how fish does not pass along unmatched globs
...
See #7043 .
[ci skip]
2020-05-27 18:09:53 +02:00
Fabian Homborg
1879b4e697
docs: Some rewording in Special Variables
2020-05-24 20:23:31 +02:00
Fabian Homborg
420f68b1e3
docs: Some rewording in the variable scope section
2020-05-24 20:23:31 +02:00
Fabian Homborg
82d720ca2a
docs: Rewrite variables section
2020-05-24 20:23:31 +02:00
Fabian Homborg
87660d3d87
docs: Rewrite identifiers and move it down
...
Weird to mention it before even explaining variables.
2020-05-24 20:23:31 +02:00
David Adam
b6eb95abad
docs: minor spelling/style corrections
...
[ci skip]
2020-05-24 16:14:23 +08:00
Fabian Homborg
07e6ccd444
docs: Rewrite index range section
2020-05-24 09:33:24 +02:00
Fabian Homborg
2522249145
docs: Rewrite cartesian product section
2020-05-24 09:33:20 +02:00
Fabian Homborg
c2a8557c38
docs: Reword brace expansion
2020-05-23 18:31:33 +02:00
Fabian Homborg
255ab2f140
docs: Reword command substitution
2020-05-23 18:31:33 +02:00
Fabian Homborg
85c970187b
docs: Reword parameter expansion/globbing
...
Why it said "Parameter expansion ("globbing")" no idea.
2020-05-23 18:31:07 +02:00
Fabian Homborg
1eb2bd13ca
docs: Reword autoloading
...
This is hard to understand, so it needs polish polish polish.
2020-05-23 18:24:43 +02:00
Fabian Homborg
25d51bf093
docs: Reword redirection/piping
...
Less emphasis on the file descriptors
2020-05-23 18:24:43 +02:00
Fabian Homborg
840663bc0b
docs: Reword quotes section
2020-05-23 18:24:37 +02:00
Fabian Homborg
814efb5569
docs: More on variable scoping
...
Specifically more examples, and more *real* examples. Some of it is
copied straight from my config.fish.
2020-05-23 16:42:54 +02:00
Fabian Homborg
9d1129f14c
docs/tutorial: Fix duplicate sentence
...
Fixes #7024 .
2020-05-20 19:20:12 +02:00
Charles Gould
b673f32b93
Add fish debugging examples
2020-05-19 21:07:33 +02:00
Fabian Homborg
e3c4692031
docs/bind: Overhaul
2020-05-18 20:48:36 +02:00
Fabian Homborg
ec759fb45e
printf: Overhaul docs
2020-05-18 20:48:36 +02:00
Fabian Homborg
56f24f08d7
printf: Don't print an error if not given an argument
2020-05-18 20:48:36 +02:00
Johannes Altmanninger
27f9920c7f
docs: sort some electric variables
2020-05-16 12:18:21 +02:00
Johannes Altmanninger
e03c375ee3
Purge remnants of process expansion, document {fish,last}_pid
2020-05-16 11:58:12 +02:00
Johannes Altmanninger
67531acc25
fish --help: remove outdated information about exit status
2020-05-16 10:33:13 +02:00
Moritz Reiter
f318da436e
Remove text duplicate in tutorial
2020-05-15 20:09:07 +08:00
LawAbidingCactus
f71737e58a
Add $fish_force_vi_cursor variable to allow cursor setting on unsupported terminals
2020-05-14 22:25:20 +02:00
Fabian Homborg
389c5e7ece
Update set --show
docs
...
See #6944
2020-04-26 17:55:17 +02:00
Fabian Homborg
1f459622cb
docs: Add fish_posterror
...
Also remove the "event will be emitted even if the command is invalid"
because it's not the case anymore, AFAICT.
See #6880 .
2020-04-25 09:25:03 +02:00
Jason Nader
18efd7dd48
Fix string split docs
2020-04-21 18:36:56 +02:00
Jason Nader
ea65db9421
string split: update docs
2020-04-20 22:39:48 +02:00
Charles Gould
2421eb6180
docs: Add completions for fish_key_reader
2020-04-19 07:06:31 +02:00
Weisi Dai
6ab2d78936
Doc: Fix dead link to POSIX man page "test".
2020-04-19 04:25:04 +02:00
Delapouite
8d20748f4a
doc: add section about directory history / stack
...
This PR also adds "See Also" section in the related commands.
2020-04-18 10:40:48 +02:00
Charles Gould
d3e720a045
docs: Use underscore in argument placeholder
2020-04-17 22:29:12 +02:00
Charles Gould
44976a5d31
docs: Remove extra colon to fix formatting
2020-04-17 22:29:12 +02:00
Johannes Altmanninger
1634a3b15c
docs: don't quote code snippets
...
The added single quotes don't look great in HTML, and it's already clear
that the monospaced text is to be interpreted literally.
2020-04-13 22:56:22 +02:00
exploide
8025e80fdb
new function __fish_preview_current_file to open file at the cursor in pager
...
bound to Alt+O by shared key bindings
created with help from @krobelus
fixes #6838
2020-04-07 22:30:05 +02:00
Soumya
639ea3caa0
Update docs for fish_kill_signal
, use "job" rather than "command"
2020-04-04 19:23:44 +02:00
Johannes Altmanninger
89c4ff9eae
Fix some inconsistencies in docs
2020-04-04 19:19:50 +02:00