refactor: properly alias cb to y

Instead of re-defining the same behavior, just write `cb` into the
y.fish function file as an alias for y
This commit is contained in:
2026-04-30 23:32:37 -04:00
parent abc5379190
commit 85f45a9e8a
2 changed files with 5 additions and 22 deletions
-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 eval $copy_cmd
end end
end end
# Alias cb=y
function cb --wraps='y' --description 'Alias cb=y'
y $argv
end