e4743bc8e2
Adds conf.d/tricks.fish (PATH additions for ~/.local/bin and depot_tools, bang-bang key bindings, history timestamp override, backup utility) and functions/copy.fish (smarter cp wrapper that strips trailing slashes from source directories, fixing a CachyOS-specific cp quirk). Updates config.fish to explicitly source copy.fish on startup and refactors several conditional blocks to single-line style for consistency. Syncs README.md to document all new utilities.
15 lines
407 B
Fish
15 lines
407 B
Fish
# Copyright (C) 2026 Rootiest
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
function copy
|
|
set count (count $argv)
|
|
if test "$count" = 2; and test -d "$argv[1]"
|
|
# 'string trim' is built straight into Fish and works everywhere
|
|
set from (string trim --right --chars=/ $argv[1])
|
|
set to (echo $argv[2])
|
|
command cp -r $from $to
|
|
else
|
|
command cp $argv
|
|
end
|
|
end
|