Commit Graph

11960 Commits

Author SHA1 Message Date
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
Sam Yu
bbb4a63d67 Fix zypper completion
Fix packages completion for `zypper download`
2020-03-16 19:09:16 +01:00
ridiculousfish
5f0c698601 Pass all check files to littlecheck at once
Instead of invoking littlecheck.py independently for each file, pass
all files at once. This amortizes the Python startup cost, and reduces
the total test time by ~15 seconds (!).
2020-03-15 18:16:14 -07:00
ridiculousfish
11c1491e5a Import latest littlecheck
Commit b2f40783a2b5b0663409c4daa90b794b02dd37a6

This has better progress reporting, and the exit status of littlecheck
indicates how many test failures there were.
2020-03-15 17:45:11 -07:00
Fabian Homborg
1e2e511570 fish_default_key_bindings: Remove outdated stderr silencing
We *always* silence `bind` here, so we don't need to specifically
silence for these keys.
2020-03-15 21:01:11 +01:00
Fabian Homborg
4a9f52466a Set locale during timer test
Fixes #6757
2020-03-15 21:01:11 +01:00
Fabian Homborg
aa629c5aca Reformat fish scripts with escaped newline changes to fish_indent 2020-03-15 21:01:11 +01:00
Fabian Homborg
7891973c9c fish_indent: Add check
This isn't quite the old-style test, but it checks some of the line
continuation stuff.

Note that littlecheck ignores leading whitespace, so testing the
actual indentation requires some more effort.
2020-03-15 21:01:11 +01:00
Fabian Homborg
cb16d9e741 fish_indent: Allow escaped newlines only for certain things
Things like

```fish
\
echo foo
```

or

```fish
echo foo; \
echo bar
```

are a formatting blunder and should be handled.

This makes it so the escaped newline is removed, and the
semicolon/token_type_end handling will then put the statements on
different lines.

One case this doesn't handle brilliantly is an escaped newline after a
pipe:

```fish
echo foo | \
cat
```

is turned into

```fish
echo foo | cat
```

which here works great, but in long pipelines can cause issues.

Pipes at the end of the line cause fish to continue parsing on the
next line, so this can just be written as

```fish
echo foo |
cat
```

for now.
2020-03-15 21:01:00 +01:00
Fabian Homborg
65d277a581 docs: Move left/right arrow to shared bindings
This is a shared binding, so documenting it in emacs was wrong.
2020-03-15 13:24:45 +01:00
Fabian Homborg
463b9b99c6 Move ctrl-left/right forward-word to shared bindings
These also work in vim.

Fixes #6755.
2020-03-15 13:24:45 +01:00
Jason Nader
266ce7c940 Improve Arch Linux package completions
Add completions for `downgrade` tool
Add new `--installed` option for printing Arch packages
Change Arch Linux package related completions to use `--installed`

add newline
2020-03-15 13:19:25 +01:00
Jason Nader
0f681190ba Fix screen optarg completions as they require a space 2020-03-15 10:21:33 +01:00
Johannes Altmanninger
f665cd6367 completions/kak.fish: use old style instead of short options
Kakoune does not accept grouped short options, or option
arguments without a separating space.
2020-03-15 08:50:21 +01:00
ridiculousfish
f117addf7c Use lowercase CMake function names
This is a best practice to distinguish them from variables.
2020-03-14 16:11:35 -07:00
ridiculousfish
f9f5775ccc Switch to C++ random number generator for history vacuum interval 2020-03-14 15:22:46 -07:00
ridiculousfish
87b1c02832 Reformat C++ files 2020-03-14 15:07:54 -07:00
Rosen Penev
fee08a87e9 [cppcheck] add const in several places
Found with constParameter, functionConst, constVariable, constArgument

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-14 15:07:54 -07:00
Rosen Penev
39861d54c5 [cppcheck] add some std::move
Found with passedByValue

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-14 15:07:54 -07:00
Rosen Penev
c3cb44cd22 [cppcheck] don't use rand_r
POSIX 2008 marks it as obsolete.

Found with rand_rCalled

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-14 15:03:14 -07:00
Rosen Penev
fdb2837bc7 [cppcheck] fix wrong format
Found with invalidPrintfArgType_uint

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-14 15:03:14 -07:00
Delapouite
71243ffbdc chore: bump copyright year 2019 → 2020 2020-03-14 14:03:09 -07:00
Tim Sampson
5cf24b7733 completions: add basic completions for 'ip netns' 2020-03-14 15:47:25 +01:00
Johannes Altmanninger
651f3cf863 Fix VSCode not blocking in edit_command_buffer 2020-03-14 14:15:10 +01:00
Johannes Altmanninger
3816c4bb39 Add comment about rounding in timer and appease clang-format 2020-03-14 13:34:31 +01:00