9 Commits

Author SHA1 Message Date
Fabian Boehm
494bdfa013 Revert accidentally pushed fork
Revert "README for this fork"

This reverts commit 97db461e7f19c51e84fbf0dcb10fb25e0f582870.

Revert "Allow foo=bar global variable assignments"

This reverts commit 45a2017580ceb1ef2d79100b6cbf65d1db3c7fa5.

Revert "Interpret () in command position as subshell"

This reverts commit 0199583435c3b584b90769d50252d16105349671.

Revert "Allow special variables $?,$$,$@,$#"

This reverts commit 4a71ee12883a720408419a53482818177a834ec7.

Revert "Allow $() in command position"

This reverts commit 4b99fe2288da07ea1d0bc79ac0c829b65fee230a.

Revert "Turn off full LTO"

This reverts commit b1213f1385ad07578ca4db5f4fa7cb6371cb3be9.

Revert "Back out "bind: Remove "c-" and "a-" shortcut notation""

This reverts commit f43abc42f91adf43bb2dfc65b29dd4f838ea21cf.

Revert "Un-hide documentation of non-fish shell builtins"

This reverts commit 485201ba2e326a0c711c003290d6f6eb2e247012.
2025-01-19 18:34:59 +01:00
Johannes Altmanninger
4a71ee1288 Allow special variables $?,$$,$@,$# 2025-01-19 18:29:07 +01:00
Johannes Altmanninger
1e858eae35 tests: filter control sequences only when interactive
This demonstrates that we only write control sequences when interactive.
2024-04-12 12:28:22 +02:00
Johannes Altmanninger
8bf8b10f68 Extended & human-friendly keys
See the changelog additions for user-visible changes.

Since we enable/disable terminal protocols whenever we pass terminal ownership,
tests can no longer run in parallel on the same terminal.

For the same reason, readline shortcuts in the gdb REPL will not work anymore.
As a remedy, use gdbserver, or lobby for CSI u support in libreadline.

Add sleep to some tests, otherwise they fall (both in CI and locally).

There are two weird failures on FreeBSD remaining, disable them for now
https://github.com/fish-shell/fish-shell/pull/10359/checks?check_run_id=23330096362

Design and implementation borrows heavily from Kakoune.

In future, we should try to implement more of the kitty progressive
enhancements.

Closes #10359
2024-04-02 14:35:16 +02:00
Fabian Boehm
947883c842 commandline: Fix setting cursor
Fixes #10358
2024-03-10 09:27:56 +01:00
Fabian Boehm
d7adf8ef87 fixup! status again
Dangit I should double-check these
2024-03-04 17:10:13 +01:00
Fabian Boehm
1f43bbb449 fixup! fix status 2024-03-04 16:54:32 +01:00
Fabian Boehm
031dbb33b1 commandline: Borrow libdata later
builtin_print_help will end up borrowing it as mutable.

Fixes #10342
2024-03-04 16:53:51 +01:00
Fabian Homborg
c4593828f4
commandline: Add --is-valid option (#8142)
* commandline: Add --is-valid option to query whether it's syntactically complete

This means querying when the commandline is in a state that it could
be executed. Because our `execute` bind function also inserts a
newline if it isn't.

One case that's not handled right now: `execute` also expands
abbreviations, those can technically make the commandline invalid
again.

Unfortunately we have no real way to *check* without doing the
replacement.

Also since abbreviations are only available in command position when
you _execute_ them the commandline will most likely be valid.

This is enough to make transient prompts work:

```fish
function reset-transient --on-event fish_postexec
    set -g TRANSIENT 0
end

function maybe_execute
    if commandline --is-valid
        set -g TRANSIENT 1
        commandline -f repaint
    else
        set -g TRANSIENT 0
    end
    commandline -f execute
end

bind \r maybe_execute
```

and then in `fish_prompt` react to $TRANSIENT being set to 1.
2021-08-14 11:29:22 +02:00