ridiculousfish
21f08ee9fd
Simplify some curses stuff and enforce that caps are nonempty
...
The outputter code has a lot of checks that string capabilities are non-empty;
just enforce that at the curses layer so we can remove those checks.
Also remove some types and traits, replacing them with simple functions.
2023-06-17 13:52:53 -07:00
ridiculousfish
dec5a64232
Outputter to implement Write
...
By implementing Write directly, we can remove some local buffers and uses of
Cursor. This both simplifies and optimizes the code.
2023-06-17 12:14:42 -07:00
ridiculousfish
64a40d2410
write_color_escape to stop returning bool
...
This bool return was always true, so we don't need it.
2023-06-17 12:14:42 -07:00
ridiculousfish
51a971bf16
Remove tparm0
...
Per code review, we think that tparm does nothing when there are no parameters,
and it is safe to remove it, even though this is a break from C++. This
simplifies some code.
2023-06-17 12:14:42 -07:00
ridiculousfish
a09947cd99
Implement builtin set_color in Rust
...
This rewrites the set_color builtin in Rust, restoring italics support in
iTerm2.
2023-06-17 12:14:42 -07:00
ridiculousfish
84b24d5615
Adopt the new output.rs
...
This switches output.cpp from C++ to Rust.
2023-06-17 12:14:42 -07:00
ridiculousfish
8f38e175ce
Add from_ffi() to rgb_color_t
...
This allows converting a C++ rgb_color_t to a Rust RgbColor.
2023-06-17 12:14:42 -07:00
ridiculousfish
8604be9a4f
Port (but do not yet adopt) output.cpp to Rust
2023-06-17 12:14:42 -07:00
ridiculousfish
76205e5b55
Port debug_thread_error() to Rust
2023-06-17 12:14:42 -07:00
Fabian Boehm
38ac21ba5e
alias: Escape the function name when replacing
...
Fixes #8720
2023-06-17 07:46:07 +02:00
Fabian Boehm
f980125fb9
docs: More on profiling
2023-06-16 16:22:58 +02:00
Fabian Boehm
bc190ee818
docs: Turn off highlighting correctly in fish_config
2023-06-16 16:17:58 +02:00
Fabian Boehm
4e3b3b3b0a
share/config.fish: Quit if job expansion hack errors
...
This prevents something like `fg %5` to foreground the first job if
there is no fifth.
Fixes #9835
2023-06-10 15:36:36 +02:00
Fabian Boehm
65769bf8c8
history: Allow deleting ranges
...
This allows giving a range like "5..7".
It works in combination with more (including overlapping) ranges or
single indices.
Fixes #9736
2023-06-10 15:35:40 +02:00
Andre Eckardt
cbf9a3bbbd
improved print CSS for fish_config
...
This commit introduces a fishconfig_print.css that contains special CSS styles that only apply when printing the fishconfig page. This is especially useful when the user wants to print out the key bindings.
2023-06-10 09:47:01 +02:00
Fabian Boehm
516b8da302
Allow disabling focus reporting
2023-06-10 07:25:20 +02:00
Fabian Boehm
ffd43c950a
docs/fish_config: Document theme files
2023-06-09 16:59:02 +02:00
Amy Grace
4c9fa511e8
Force use of macOS's builtin manpath
...
Prevent a useless warning msg if Homebrew's `man-db` is installed and configured
2023-06-06 13:12:30 -05:00
Fabian Boehm
3cd527a62e
docs: Improve bg docs
...
Show an actual session here, to explain what you would actually do
with it.
2023-06-05 18:26:13 +02:00
ridiculousfish
908e234bf6
Changelog fix for #9833
...
Also relevant is #9812
2023-06-04 13:44:36 -07:00
Simon Börjesson
71c320ca32
Redraw pager on new selection when nothing was selected previously
2023-06-04 13:40:30 -07:00
Clemens Wasser
c2f58cd312
Port killring
2023-06-04 12:18:19 -07:00
ridiculousfish
cfdcaf880f
Simplify scoped_push and ScopedGuard
...
This makes some simplifications to scoped_push and ScopeGuard:
1. ScopeGuard no longer uses ManuallyDrop; the memory management is now
trivial and no longer requires `unsafe`.
2. The functions `cancel` and `rollback` have been removed, as
these were unused. They can be added back later if needed.
3. `scoped_push` has been simplified in both signature and implementation.
4. `Projection` is no longer required and has been removed.
Also add some tests.
2023-06-04 12:14:53 -07:00
ridiculousfish
777ba6f9d8
Use consistent formatting in the parse_rgb test
2023-06-03 12:15:45 -07:00
ridiculousfish
1bbd60c597
Fix a bug in the color.rs port
...
This was incorrectly parsing FFF as 0x0F0F0F instead of 0xFFFFFF.
2023-06-03 12:13:57 -07:00
Zehka
a0a2475ccb
fixed a few smaller things in my translations
2023-06-03 14:03:58 +02:00
Zehka
6c6d281938
another commit to rectify the chaos i created
2023-06-03 14:03:58 +02:00
Zehka
b5fae430c0
added some german translations
2023-06-03 14:03:58 +02:00
Fabian Boehm
e54795a924
CONTRIBUTING: Improve translation section
...
This should include the important info from the wiki.
We should try to find some recommendation for tools, or even an online
platform where people can submit translations without having to go
through all this setup
2023-06-02 17:38:00 +02:00
Fabian Boehm
756cb15f81
CONTRIBUTING: Rationalize sections
...
Mostly this tries to give logical header levels, so the "Fish Style
Guide" section is in the "Code Style" section
Also remove a few unimportant C++-centric sections - I'm not sure iwyu
even runs anymore, and cppcheck isn't great in my experience.
2023-06-02 17:38:00 +02:00
Jo
272d123431
Fix a typo in language.rst
2023-06-02 13:13:49 +02:00
Fabian Boehm
946ecf235c
Restyle fishscript and python
2023-06-01 18:20:19 +02:00
Fabian Boehm
81d91f1038
create_manpage_completions: Really ignore bundle/cargo
2023-06-01 18:17:47 +02:00
Fabian Boehm
a913702b63
Add more benchmarks
2023-06-01 18:15:42 +02:00
Fabian Boehm
77337fdc8a
style.fish: Add rustfmt support
2023-06-01 18:14:12 +02:00
Fabian Boehm
4ed74ed6c1
Improve CONTRIBUTING and add it to the docs
2023-06-01 18:09:02 +02:00
David Adam
688a28c1d2
Rewrite and adopt print_help in Rust
2023-06-01 23:17:13 +08:00
may
d19a08cd8c
update npm completions ( #9800 )
...
* update npm install completions
* update npm uninstall
* init npm dep rewrite
+ init npm
* npm uninstall complete global packages
* add npm pack completions
* add npm publish completions
* add npm init completions
* add missing commands, remove outdated, add missing aliases
* add npm audit completions
* implement requested changes
* rename __yarn_ to __npm_
* add missing commands / aliases
* slightly less verbose options, reword dry-run description (meh)
* more commands and options
* add and update completions for several commands
* access, adduser, bugs, ci, config, cache
* dedupe, deprecate, dist-tag, diff, docs, doctor
* edit, exec, explain, explore, find-dupes, fund
* hooks, help-search, install, ls, publish, search
* version, view
* more commands, fixes
* fish_indent
* remove most aliases from command suggestions
* add most other commands
* npm help, --help
* minor fixes
* remove npm builtin completion, new install option, fish_indent
* add completions for npm set, npm get
2023-05-30 11:22:18 +02:00
may
6b1e6dd179
add completions for git update-index
( #9759 )
...
* add git update-index completions
* remove todo
* fix leftover from copying lines
* improve and shorten
2023-05-30 11:21:00 +02:00
ridiculousfish
3d447dec3a
Fix a multiplicative overflow in color.rs
...
Also add a test.
2023-05-29 13:22:46 -07:00
David Adam
3b55563769
print_help: simplify function to always use stdout
...
It's only called in two places and always uses stdout.
2023-05-28 12:55:40 +08:00
Kevin F. Konrad
ffb6168221
implement completion for age and age-keygen
2023-05-27 11:15:37 -07:00
Mahmoud Al-Qudsi
5ecd584063
Merge VarDispatchTable tables
...
There was only one entry in the named table, so the previous layout was quite
wasteful. This should speed up lookups and reduce memory overhead.
2023-05-26 22:59:55 -05:00
David Adam
30d9d48bc1
env_dispatch: drop C++ implementation
2023-05-27 11:32:14 +08:00
Mahmoud Al-Qudsi
5ce1716451
Merge pull request #9786 from mqudsi/riir_env_dispatch
...
Riir env_dispatch
2023-05-26 12:45:08 -05:00
Fabian Boehm
2eba6845c2
create_manpage_completions: Use raw strings for backslashes
...
python 3.12 emits a SyntaxWarning for invalid escape sequences.
Fixes #9814
2023-05-26 14:01:52 +02:00
Mahmoud Al-Qudsi
6638c78b30
Port env_dispatch to Rust and integrate with C++ code
2023-05-25 16:54:07 -05:00
Mahmoud Al-Qudsi
cce78eeb43
Update env_var_to_ffi() to take an Option<EnvVar>
...
It wasn't possible to handle cases where vars.get() returned `None` then forward
that to C++, but now we can.
2023-05-25 16:54:07 -05:00
Mahmoud Al-Qudsi
32912b6525
Expose env_dyn_t
in env.h
...
So that we may use it from files other than `src/env.cpp` to accept a
`&dyn Environment` out of rust.
2023-05-25 16:54:07 -05:00
Mahmoud Al-Qudsi
6bb2725f67
Make sure rust's fish_setlocale() inits global C++ variables
...
We can't just call the Rust version of `fish_setlocale()` without also either
calling the C++ version of `fish_setlocale()` or removing all `src/complete.cpp`
variables that are initialized and aliasing them to their new rust counterparts.
Since we're not interested in keeping the C++ code around, just call the C++
version of the function via ffi until we don't have *any* C++ code referencing
`src/common.h` at all.
Note that *not* doing this and then calling the rust version of
`fish_setlocale()` instead of the C++ version will cause errant behavior and
random segfaults as the C++ code will try to read and use uninitialized values
(including uninitialized pointers) that have only had their rust counterparts
init.
2023-05-25 16:54:07 -05:00