1
0

chore: standardize fish config (+ sync into)

This commit is contained in:
2025-12-19 16:06:43 +01:00
parent 5439235834
commit f1b828c7fe
3 changed files with 12 additions and 27 deletions

View File

@@ -1,26 +1,19 @@
function clip function clip
if not command -q xclip if not command -q xclip
echoerr "clip: 'xclip' is not available on this system" echoerr "clip: xclip is not available on this system"
return 1 return 1
end end
if not tty -s if not tty -s
set -l stdin read -zl stdin
read stdin -z echo $stdin | xclip -selection clipboard
return $status
end end
if set -ql stdin if string length -qV -- (string trim -- $argv)
echo "$stdin" | xclip -selection clipboard echo $argv | xclip -selection clipboard
echo "copied into clipboard (stdin)" return $status
return 0
end
if [ -n "$(string trim -- $argv)" ]
echo "$argv" | xclip -selection clipboard
echo "copied into clipboard"
return 0
end end
xclip -selection clipboard -o xclip -selection clipboard -o
end end

View File

@@ -0,0 +1,4 @@
function into -a dir
mkdir -p $dir
cd $dir
end

View File

@@ -1,12 +0,0 @@
function nix-shell
if not command -q nix-shell
command nix-shell;
return $status;
end
set -l _argv $argv
argparse -i 'p/packages=' -- $argv
or command nix-shell -- $_argv
set -x FISH_NIX_PACKAGES
end