Commit Graph

722 Commits

Author SHA1 Message Date
Kurtis Rader
bd299e96b2 implement status is-breakpoint
This implements `status is-breakpoint` that returns true if the current
shell prompt is displayed in the context of a `breakpoint` command.

This also fixes several bugs. Most notably making `breakpoint` a no-op if
the shell isn't interactive. Also, typing `breakpoint` at an interactive
prompt should be an error rather than creating a new nested debugging
context.

Partial fix for #1310
2017-06-20 17:18:59 -07:00
Kurtis Rader
ed6c8a95d7 improve debugger documentation
Fixes #4125
2017-06-15 16:53:56 -07:00
Kurtis Rader
955ae76cb3 minor fix to string man page 2017-06-11 11:59:36 -07:00
Fabian Homborg
65b80da60b tutorial: Mention combiners in conditionals section
See #4116.
2017-06-11 13:58:43 +02:00
Fabian Homborg
7bdcbc1775 tutorial: Add section on the semicolon
See #4116.
2017-06-11 13:58:39 +02:00
Kurtis Rader
f6c9bfc0e8 implement string lower and string upper
Fixes #4080
2017-06-10 17:35:25 -07:00
Kurtis Rader
a520d97752 there is no "undo" key binding 2017-06-07 17:04:17 -07:00
Fabian Homborg
822ee634c4 docs: Mention command-substitution splitting in tutorial
See #4097.
2017-06-06 22:06:09 +02:00
Kurtis Rader
c263c59346 document that set -n output is sorted 2017-05-31 13:22:49 -07:00
Kurtis Rader
6f6d3ce520 note in the tutorial the vars that are auto split
Users continue to be surprised that fish auto splits/joins three env
vars but not other similar vars. Mention this in the tutorial to make it
less likely new users are surprised by this behavior.

Fixes #4009
2017-05-26 17:00:57 +02:00
Fabian Homborg
0ee24b9bce docs: Change misleading $status comment for set
It still performs the assignment even if the command substitution
returned unsuccessfully - `set foo (echo bar; false)` returns 1 but
sets $foo to bar.

Also use `type -p` instead of `which`.
2017-05-19 19:06:44 +02:00
Fabian Homborg
64d33fac5d docs: Improve faq-exit-status
Add examples, a mention of `if command` and link to test/if.

See #2773.
2017-05-19 19:05:47 +02:00
Kurtis Rader
e84200b847 remove incorrect statement from string docs
Another change related to issue #3985. I forgot to includes this in my
previous two changes related to to consistently returning status 121
when any command, not just `string`, is handed invalid args.
2017-05-07 21:26:45 -07:00
Kurtis Rader
4c38867768 another step in fixing issue #3985
This primarily replaces "STATUS_BUILTIN_OK" with "STATUS_CMD_OK" and
"STATUS_BUILTIN_ERROR" with "STATUS_CMD_ERROR". That is because we want
to make it clear these status codes are applicable to fish functions as
well as builtins. Future changes will make it easier to use these
symbols and values in functions.
2017-05-04 00:18:02 -07:00
Kurtis Rader
fb54d34788 change string match --filter to --entire
Per discussion in PR#3998 to review adding a `--filter` flag to `string
replace` rename the same flag in the `string match` subcommand to avoid
confusion about the meaning of the flag.
2017-05-01 22:19:58 -07:00
Kurtis Rader
16816a1202 add string replace --filter flag
Fixes #3348
2017-05-01 22:07:30 -07:00
Kurtis Rader
6b1c939b67 rename --metadata to --details
Discussion in issue #3295 resulted in a decisions to rename the
functions --metadata flag to --details.

This also fixes a bug in the definition of the short flags for the
`functions` command. The `-e` flag does not take an argument and
therefore should not be defined as `e:`. Notice that the long form,
`--erase`, specifies `no_argument`. This discrepency happened to work
due to a quirk of how the flag parsing loop was written.
2017-04-30 20:21:40 -07:00
David Adam
4fde67fa50 implement disown builtin
Closes #2810.

The syntax mirrors that of zsh.
2017-04-29 19:20:03 +08:00
Marc Garcia Sastre
980af4aa5b status returns the function name when called with -u parameter
Fixes #1743
2017-04-26 20:15:45 -07:00
Kurtis Rader
a1d5a19e24 fix string man page
Fixes #3987
2017-04-25 08:48:00 -07:00
Kurtis Rader
5b6814d6ad add string match --filter flag
Fixes #3957
2017-04-24 21:45:06 -07:00
Fabian Homborg
30e02383a5 Identifiers: Fix typo.
Function names can indeed not contain a "/".
2017-04-23 13:46:56 +02:00
Kurtis Rader
275d658616 simplify and clarify valid identifiers
This is the first step in addressing issue #3965. It renames some of the
functions involved in validating variable and function names to clarify
their purpose. It also augments the documentation to make the rules for
such identifiers clearly documented.
2017-04-21 21:55:06 -07:00
Kurtis Rader
15e1f4349b document [alt-enter] behavior in funced command
Fixes #893
2017-04-21 17:15:56 -07:00
Fabian Homborg
3c95e00e8a It's "single quotes", not "single-quotes" 2017-04-21 13:43:02 +02:00
Francisco Giordano
349eff0df7 change cancel_commandline function to use color from variable
This allows the user to define how they want the "^C" rendered when a
pending command line is interrupted.
2017-04-17 21:16:42 -07:00
Kurtis Rader
fae1a398bd document new read --silent flag 2017-04-11 19:30:12 -07:00
Fabian Homborg
2a2ccea24e Document special-paste 2017-04-11 14:42:36 +02:00
Rory O’Kane
35e1d1e2d8 Fix deprecated flags in history example in docs
Update the Example section in the documentation for the `history` command so that it uses the subcommands instead of the deprecated long options.
2017-04-05 19:55:58 +02:00
Fabian Homborg
3edb7d538f Improve bg argument handling
- Error out if anything that is not a PID is given

- Otherwise background all matching existing jobs, even if not all
  PIDs exist (but print a message for the non-existing ones)

Fixes #3909.
2017-04-04 14:59:43 +02:00
Kurtis Rader
38c851f4cf let read take a simple string for the prompt
Fixes #802
2017-03-25 20:24:43 -07:00
Fabian Homborg
e1c3ec25ab Document snippet sourcing order
Fixes #3099.
2017-03-23 17:46:11 +01:00
Kurtis Rader
542962bc69 document events are per fish process
Fixes #2954
2017-03-22 20:53:39 -07:00
Fabian Homborg
2118973251 Document \cn/\cp bindings
We want to downplay this in favor of the arrow keys, but mentioning it
is still the right thing to do.

Supersedes #3879.
2017-03-20 16:49:29 +01:00
Fabian Homborg
70354f9f5e Add bind --list-modes option
Fixes #3872.
2017-03-20 16:42:53 +01:00
Kurtis Rader
6fd8dc44fb support test -k to test the sticky bit
Fixes #733
2017-03-14 21:43:15 -07:00
Kurtis Rader
6123d3cb50 document trap ... EXIT
Fixes #1180
2017-03-14 21:02:02 -07:00
Kurtis Rader
1afea1b650 add description to functions -m -v output
Fixes #597
2017-03-13 20:52:31 -07:00
Greynad
98f4e49669 Add string 'repeat' subcommand
This feature add the ability to repeat a string a given number of times.
For example: string repeat -n 3 foo
2017-03-12 20:30:36 -07:00
David Adam
40de253b3a Upgrade git:// and http:// URLs to https://
Work on fish-shell/fish-site#47

[ci skip]
2017-02-17 21:31:44 +08:00
ridiculousfish
2ea2a4c831 Make error color in tutorial a more pastel red 2017-02-12 15:41:31 -08:00
ridiculousfish
67c18c77d0 'Correct' error to eror in lexicon_filter
This changes the error examples in the tutorial to properly show in
red
2017-02-12 15:39:22 -08:00
Kurtis Rader
af7f5f42b6 put upper bound on data read will consume
This puts a hard upper bound of 10 MiB on the amount of data that read
will consume. This is to avoid having the shell consume an unreasonable
amount of memory, possibly causing the system to enter a OOM condition,
if the user does something non-sensical.

Fixes #3712
2017-02-09 21:04:46 -08:00
Kurtis Rader
9b24d26972 document creating - abbreviation in FAQ 2017-02-08 13:22:47 -08:00
Kurtis Rader
2e38cf2a4b implement means to learn about a functions source
This implements a way to use the `functions` command to perform
introspection to learn about the characteristics of a function. Such as
where it came from.

Fixes #3295
2017-01-20 21:48:41 -08:00
Kurtis Rader
2be1288cac handling when stty reports zero for termsize
If the kernel reports a size of zero for the rows or columns (i.e., what
`stty -a` reports) fall back to the `COLUMNS` and `LINES` variables. If
the resulting values are not reasonable fallback to using 80x24.

Fixes #3740
2017-01-20 15:34:29 -08:00
mathbunnyru
7a80610300 Delete trailing spaces 2017-01-15 14:57:21 -08:00
Cristian Prieto
6f9f7632f3 Added default mode prompt function (#3727)
* Added new function for the default prompt mode

Now fish mode prompt will call fish_default_mode_prompt, this will solve #3641

* Added function description

* Change wording for documentation about default mode prompt

* Finish changes requested in code review
2017-01-12 16:07:41 +01:00
Kurtis Rader
f365f720da don't warn about using obsolete complete options
Fixes #3640
2017-01-09 11:21:34 -08:00
Fabian Homborg
c5a6d87c5e Add while-read example to read docs 2017-01-07 14:31:05 +01:00