feat: add history expansions and interactive keybindings #1

Merged
rootiest merged 1 commits from feat/bangs-and-subs into main 2026-04-30 05:04:03 +00:00
Owner

This PR adds bash-style history expansions and interactive keybindings to the Fish configuration.

Changes:

  • History Expansions: Implemented via abbreviations and helper functions to replicate common Bash "bang" operations:
    • !^: First argument of the previous command.
    • !*: All arguments of the previous command.
    • ^old^new: Quick substitution.
    • !string: Last command starting with string.
    • !?string?: Last command containing string.
    • !-n: n^{th} previous command.
  • Interactive Key Bindings:
    • Ctrl+G: Previous Path Head (Bash !$:h).
    • Ctrl+F: Interactive History Substitution (Bash !!:s/old/new/).
    • Ctrl+Alt+U: Replace Command Token (strips the command and moves cursor to front).
  • Documentation: Updated README.md with a new "Key Bindings" section and expanded the "Abbreviations" section.
This PR adds bash-style history expansions and interactive keybindings to the Fish configuration. ### Changes: - **History Expansions:** Implemented via abbreviations and helper functions to replicate common Bash "bang" operations: - `!^`: First argument of the previous command. - `!*`: All arguments of the previous command. - `^old^new`: Quick substitution. - `!string`: Last command starting with `string`. - `!?string?`: Last command containing `string`. - `!-n`: $n^{th}$ previous command. - **Interactive Key Bindings:** - `Ctrl+G`: Previous Path Head (Bash `!$:h`). - `Ctrl+F`: Interactive History Substitution (Bash `!!:s/old/new/`). - `Ctrl+Alt+U`: Replace Command Token (strips the command and moves cursor to front). - **Documentation:** Updated `README.md` with a new "Key Bindings" section and expanded the "Abbreviations" section.
rootiest added 1 commit 2026-04-30 05:03:42 +00:00
- Replicate bash bang-operations (!^, !*, !string, etc.) via abbreviations
- Add Ctrl+G for previous path head insertion
- Add Ctrl+F for interactive history substitution
- Add Ctrl+Alt+U to quickly replace command tokens
- Update README documentation for all new features
rootiest merged commit f6da342610 into main 2026-04-30 05:04:03 +00:00
rootiest deleted branch feat/bangs-and-subs 2026-04-30 05:04:03 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rootiest/fish-config#1