Hotfix: split and y/cb functions #7

Merged
rootiest merged 2 commits from fix/fallback-funcs into main 2026-05-01 03:34:42 +00:00
2 changed files with 5 additions and 22 deletions
Showing only changes of commit 85f45a9e8a - Show all commits
-22
View File
@@ -1,22 +0,0 @@
# Copyright (C) 2026 Rootiest
# SPDX-License-Identifier: AGPL-3.0-or-later
# Copy to clipboard
function cb --description 'Copy to clipboard'
if type -q wl-copy
if set -q argv[1]
echo $argv | wl-copy
else
wl-copy
end
else if type -q xclip
if set -q argv[1]
echo $argv | xclip -selection clipboard
else
xclip -selection clipboard
end
else
echo "Error: No clipboard provider found." >&2
return 1
end
end
+5
View File
@@ -35,3 +35,8 @@ function y --description 'Yank to clipboard'
eval $copy_cmd
end
end
# Alias cb=y
function cb --wraps='y' --description 'Alias cb=y'
y $argv
end