Commit Graph

11934 Commits

Author SHA1 Message Date
Johannes Altmanninger
64a89f882d Fix directory highlighting with custom CDPATH
Reproduce: `set CDPATH . /usr; mkdir foo` Then type "cd foo" and notice
that foo is highlighted incorrectly, because there is no /usr/foo.
2020-03-25 20:36:58 +01:00
Fabian Homborg
356b35e446 completions/gcc: Improve some descriptions
This file is autogenerated, and these descriptions need quite a
cleanup.

This does the first 10% or so.

[ci skip]
2020-03-25 20:18:11 +01:00
exploide
85d6d90bf7 added completions for traceroute and tracepath 2020-03-25 18:27:56 +01:00
Matthieu Guilbert
314f4c48fc Update terraform completion
Add completion for terraform worskpace.

The terraform env command is deprecated.
The terraform workspace command should be used instead.
"terraform env" will be removed in a future Terraform version.
2020-03-25 18:25:19 +01:00
fcd
3246f736b8 docs: Fix repeated word in argparse documentation 2020-03-25 18:23:19 +01:00
Johannes Altmanninger
0a2eea4cc6 Invert test for implicit cd after builtin command
Because `command ./somedir/somecommand` is okay.

Fixes test failure from aa304cbd3d.

Child directories in $PATH are still not suggested, as was the main
intention of the commit that introduced the tests:
8a3cf144f Don't include child directories of $PATH in completions.
2020-03-24 22:02:27 +01:00
JanczarKnurek
e78ed51747 Add flag names to usage line
Signed-off-by: JanczarKnurek <jacek@beit.tech>
2020-03-24 21:04:29 +01:00
JanczarKnurek
b1c14cf084 Add missing flags desc to script
create_manpage_completions now has all flags in help

Signed-off-by: JanczarKnurek <jacek@beit.tech>
2020-03-24 21:04:29 +01:00
Johannes Altmanninger
aa304cbd3d Restore directory completions for subcommands
Fixes #6798

This re-adds some false positives: functions, builtins and abbreviations
are suggested after commands like sudo but I don't think anyone had
complained about that.
2020-03-24 20:18:07 +01:00
Fabian Homborg
26c51817f2 Print better error if one argument is too long
Fixes #6800
2020-03-24 17:23:41 +01:00
Fabian Homborg
52f819cd35 sample_prompts/nim: Add vi mode indicator
The default indicator ruined alignment, which is a major design
feature here.

Handle it by including the mode indicator in the prompt proper.

Fixes #6802.

[ci skip]
2020-03-24 17:08:19 +01:00
Johannes Altmanninger
d0bedf3bbd help.fish: only use cmd.exe on WSL
Fixes #6797
2020-03-23 21:02:15 +01:00
Johannes Altmanninger
1547a22659 docs: remove some spurious backslashes 2020-03-23 21:02:15 +01:00
George Christou
a45ffb7993 string/trim: Add VT to list of default chars 2020-03-23 18:37:08 +01:00
George Christou
a3436110c1
Add string sub --end (#6765) 2020-03-22 15:53:09 +01:00
Jason Nader
979d3a18aa help function: special case string xxx 2020-03-22 09:33:07 +01:00
ridiculousfish
0844bcfef1 gitignore __pycache__ 2020-03-21 17:48:01 -07:00
Fabian Homborg
b61913ee74 docs: Add FAQ about unicode issues
This is an actual Frequently Asked Question.

[ci skip]
2020-03-21 18:01:17 +01:00
Fabian Homborg
638a66c8ff pwd: Add "--physical" and "--logical" long options
These were already mentioned in the completions, and we don't
typically add short-only options.

Fixes #6787.
2020-03-21 16:21:15 +01:00
Fabian Homborg
fd45877848 docs: Link builtins
When we say "the XYZ command/builtin", we should typically include a
link. The exceptions are

- In the documentation for that command - no need to link to ulimit in
  the ulimit page
- When we've already linked before - not every thing needs to be
  clickable, or clicking it will cause the browser to mark fifty words
  as visited. This is roughly what wikipedia does for crosslinks.

[ci skip]
2020-03-21 15:31:25 +01:00
Fabian Homborg
8ddd512fba Refine when we expand abbreviations
- ctrl-space will insert a space without expanding abbrs
- ")" or alt-enter will expand abbrs

Fixes #6658
2020-03-21 13:55:15 +01:00
Jon Cinque
23a21eb318 Add vi 'y' bindings and some i / a support
Many people have mentioned wanting support for changing / yanking /
deleting between "" and '', meaning the commands `ci' ci" yi' yi" di' di"`,
so this adds that support in a generic, and thus potentially confusing way.
The concept is that we check for the character backwards and forwards
before making the selection.  Unfortunately, this will also work for *any*
character that isn't `w` or `W`, so `cia` could change everything between
two `a` characters.
Looking through the [bind documentation](https://fishshell.com/docs/current/cmds/bind.html)
and input handler at `src/input.cpp`,
this is the best possible solution I could come up with until
`forward-jump` and `backward-jump` can accept input in the call to `bind`,
and not just from stdin, meaning we can write a binding as:
```
bind di\" backward-jump-till \" and repeat-jump-reverse ...`
```
If that were done, then other commands such as `di)` to go between `()` would
be possible.
There are also some added `y` bindings not part of #6648.
Let me know if you need anything else.
2020-03-21 13:52:12 +01:00
Jason Nader
c4156677cc Remove unnecessary use of begin 2020-03-21 13:26:58 +01:00
Jason Nader
eba099bf77 Fix abook completions 2020-03-21 13:22:32 +01:00
Delapouite
401e5d1f6b doc: add links to 'source' command from 'eval' and 'functions' 2020-03-21 13:21:38 +01:00
Charles Gould
54da5b82ba docs: Fix spacing on key combinations 2020-03-21 13:20:34 +01:00
Charles Gould
90b46c72c8 docs: Use arrow symbols consistently 2020-03-21 13:20:34 +01:00
Charles Gould
fb6257ebc3 docs: Capitalize all keystroke characters 2020-03-21 13:20:34 +01:00
Fabian Homborg
0bb923dcec docs: Make a fish-completions manpage
[ci skip]
2020-03-21 12:07:30 +01:00
Johannes Altmanninger
dfb8229f81
Merge pull request #6776 from Delapouite/funced-save
feat: add missing 'save' completion for funced
2020-03-20 17:15:30 +01:00
Mahmoud Al-Qudsi
1d7643751b Revert "Make funcsave update the function <-> file mapping"
This reverts commit 7f402cdae7.

There are fundamental issues with `funced` and `funcsave` that prevent
this from working. A file and a function are not interchangeable.
2020-03-20 10:18:52 -05:00
Mahmoud Al-Qudsi
7f402cdae7 Make funcsave update the function <-> file mapping
This makes `funced` after `funcsave` behave as expected rather than a
potential source of data loss.

Closes #6113.
2020-03-20 10:03:05 -05:00
Johannes Altmanninger
75ae172ba2 token search: replace only until the end of the token
Fixes #6774
2020-03-20 14:05:49 +01:00
Delapouite
6b73079e27 feat: add missing 'save' completion for funced 2020-03-19 21:55:40 +01:00
Fabian Homborg
469e81e01d docs: Remove weird ", Left"
This was meant as an alternative key name or something, but it's just
rendered. It seems clear what the glyph refers to and we explain it
where we explain the left/right bindings anyway.

[ci skip]
2020-03-19 19:48:24 +01:00
Fabian Homborg
ffd930e35b docs: Format keychords as two :kbd: entries
Looks better in the html - see #6752.

Also this converts the "ctrl-something" instances I could find to
proper markup.

[ci skip]
2020-03-19 19:43:49 +01:00
Johannes Altmanninger
390647ae34 Suppress history autosuggestion for command lines prefixed with a space
Currently we do not add such command lines to the history, so there
won't be a suggestion from history anyway.

Fixes #6763 which occurs because midnight commander feeds fish commands
like this one (note the loading space)

` cd (printf '%b' '\0057home\0057johannes\0057git\0057fish\0055shell\0057build')`
2020-03-19 18:59:20 +01:00
Jason Nader
0d43615af2 Update completions for read builtin 2020-03-19 18:23:17 +01:00
Delapouite
0152ba87c8 doc: make <kbd> style more prominent 2020-03-19 18:22:40 +01:00
Fabian Homborg
06b317c07f Document funced/funcsave harder
[ci skip]
2020-03-19 18:02:16 +01:00
Fabian Homborg
179d92452d Resurrect one last function
So *that's* where "r2l" is used!
2020-03-17 21:58:49 +01:00
Fabian Homborg
b7b09add95 Revert complete_directories change
Turns out my test dir wasn't as clean as it should have been.
2020-03-17 21:45:49 +01:00
Fabian Homborg
04bc16530c Ressurect a couple of test functions
Missed these, sorry!
2020-03-17 21:44:26 +01:00
Fabian Homborg
4d052da922 Remove classic ".in" test machinery
We have now entirely switched the script tests to littlecheck.

Note: This adjusts the complete_directories test, because it removes a
directory that was created before by a .in test. There's no real
change in behavior.

This does require the test directory be cleaned, or the tests will fail.

test_util gets to stay for a while longer, because it sets up the
testing env (locale and such).
2020-03-17 21:34:36 +01:00
Fabian Homborg
957526a283 Port "test9" to littlecheck
Just add it to basic.fish

This was the last .in test.
2020-03-17 21:19:41 +01:00
Fabian Homborg
fbf9d4e6f8 Port "test7" to littlecheck
Soon.
2020-03-17 20:57:45 +01:00
Fabian Homborg
e78db2bcb8 Port "test1" to littlecheck
This, together with the other testX, really just tests some basic
syntax. So let's just call it "basic".

Note that this file uses escaped newlines on purpose, so restyling it
would currently break it. I'm not sure what the best thing to do here is.
2020-03-17 20:48:40 +01:00
Fabian Homborg
2731bcec70 Port umask tests to littlecheck
This saves us from adding all these explanatory echoes.
2020-03-16 21:21:10 +01:00
Fabian Homborg
52b5afe2f8 Port expansion test to littlecheck
This one really is a lot easier to follow
2020-03-16 21:21:10 +01:00
Fabian Homborg
7e594e692c Port fish_indent tests to littlecheck 2020-03-16 21:21:10 +01:00