feat(functions,bindings): add smart-execute, fast-cli; refactor qalc and rm

- Add _smart_execute: context-aware Ctrl+Enter that routes to qalc when
  the buffer ends with '=', or falls through to standard execute otherwise
- Refactor qalc_eval → _qalc_eval (private helper, same behavior)
- Bind Ctrl+Enter to _smart_execute in all vi modes
- Add fast-cli wrapper (fast.com speed test) and fast placeholder with
  a friendly ANSI redirect message
- Add speedtest-fast abbreviation expanding to fast-cli
- Enhance _replace_command_token to handle sudo-prefixed commands: places
  cursor at index 5 (between sudo and the replacement slot)
- Improve rm error reporting: colored output, culprit-path listing, and
  cleaned technical detail for non-missing-file errors
- Add SPDX copyright headers to cat, ld, claude-docs, claude-pr functions
- Update README: Ctrl+Enter binding, fast-cli/fast functions, speedtest-fast abbr
This commit is contained in:
2026-05-10 01:36:14 -04:00
parent 4dff7632cd
commit b62c2476da
13 changed files with 181 additions and 12 deletions
+4 -2
View File
@@ -52,7 +52,8 @@ function fish_user_key_bindings
bind ctrl-g __insert_previous_path_head
bind ctrl-f __interactive_history_sub
bind ctrl-alt-u _replace_command_token
bind ctrl-alt-= qalc_eval
bind ctrl-alt-= _qalc_eval
bind ctrl-enter _smart_execute
# Set bindings for all Vi modes:
# 'default' is Vi-Command, 'insert' is Vi-Insert, 'visual' is Vi-Visual
@@ -60,6 +61,7 @@ function fish_user_key_bindings
bind --mode $mode ctrl-g __insert_previous_path_head
bind --mode $mode ctrl-f __interactive_history_sub
bind --mode $mode ctrl-alt-u _replace_command_token
bind --mode $mode ctrl-alt-= qalc_eval
bind --mode $mode ctrl-alt-= _qalc_eval
bind --mode $mode ctrl-enter _smart_execute
end
end