e502cff8cb
- conf.d/fzf.fish: skip fzf_configure_bindings if fzf is not in PATH - key_bindings.fish: only bind Ctrl+Alt+= when qalc is installed - _qalc_eval: return 1 early if qalc is absent so callers can react - _smart_execute: fall back to normal execute when _qalc_eval returns 1 - integrations/fzf.fish: replace bg-transform with transform (available since fzf 0.53; bg-transform requires a newer version and caused "unknown action" errors on fzf 0.60 devel)
23 lines
593 B
Fish
23 lines
593 B
Fish
# Copyright (C) 2026 Rootiest
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
# Returns the result of a qalc calculation
|
|
function _qalc_eval
|
|
type -q qalc || return 1
|
|
|
|
# Get the current command line buffer
|
|
set -l cmd (commandline)
|
|
|
|
# If the buffer isn't empty, run it through qalc
|
|
if test -n "$cmd"
|
|
echo
|
|
# Passes the buffer to qalc
|
|
# -t (terse) is optional, remove it if you want the full verbose output
|
|
echo "$cmd" | qalc
|
|
|
|
# Clear the command line for the next task
|
|
commandline -r ""
|
|
commandline -f repaint
|
|
end
|
|
end
|