feat(functions,bindings): add smart-execute, fast-cli; refactor qalc and rm #12
Reference in New Issue
Block a user
Delete Branch "feat/smart-execute-fast-cli"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
_smart_execute+Ctrl+Enterbinding: Context-aware Enter key. If the buffer ends with=, evaluates it as a math expression viaqalc. Otherwise executes normally (empty buffer = standard Enter)._qalc_evalrefactor: Renamed fromqalc_evalto a private helper (_qalc_eval); behavior unchanged, now used by bothCtrl+Alt+=and_smart_execute.fast-cli+fast: Newfast-clifunction wraps thefastCLI for fast.com speed tests.fastshows a friendly ANSI redirect message if someone types the wrong name.speedtest-fastabbreviation added._replace_command_tokenenhancement: Now handlessudo-prefixed commands separately — strips the middle token and places the cursor at position 5 (aftersudo) instead of index 0.rmerror handling: Trash failures now produce colored, structured output — red error label, culprit source paths listed with↳, and a cleaned technical detail fallback for non-missing-file errors.cat.fish,ld.fish,claude-docs.fish,claude-pr.fish.Ctrl+Enterbinding,fast-cli/fastfunctions, andspeedtest-fastabbreviation.Manual Verification
150 * 1.08 =and pressCtrl+Enter— should evaluate via qalc and print the result, clearing the buffer.ls -laand pressCtrl+Enter— should execute the command normally.Ctrl+Enteron an empty prompt — should behave like a standard Enter (new line / execute).150 * 1.08and pressCtrl+Alt+=— should still work as before.fast-cli— should launch a fast.com speed test.fast(no-cli) — should print a friendly ANSI redirect message, not an error.speedtest-fastand press Space — should expand tofast-cli.sudo mkdir /tmp/test-dirthen pressCtrl+Alt+U— cursor should land at position 5 (aftersudo), ready to replacemkdir.rm nonexistent-file.txt— should show a colored error with the culprit path listed under↳ Source:.qalc_eval(old public function) no longer exists:type qalc_evalshould return "not found".