chore: standardize fish config (+ sync into)
This commit is contained in:
@@ -1,26 +1,19 @@
|
||||
function clip
|
||||
if not command -q xclip
|
||||
echoerr "clip: 'xclip' is not available on this system"
|
||||
if not command -q xclip
|
||||
echoerr "clip: xclip is not available on this system"
|
||||
return 1
|
||||
end
|
||||
|
||||
if not tty -s
|
||||
set -l stdin
|
||||
read stdin -z
|
||||
read -zl stdin
|
||||
echo $stdin | xclip -selection clipboard
|
||||
return $status
|
||||
end
|
||||
|
||||
if set -ql stdin
|
||||
echo "$stdin" | xclip -selection clipboard
|
||||
echo "copied into clipboard (stdin)"
|
||||
return 0
|
||||
end
|
||||
|
||||
if [ -n "$(string trim -- $argv)" ]
|
||||
echo "$argv" | xclip -selection clipboard
|
||||
echo "copied into clipboard"
|
||||
return 0
|
||||
if string length -qV -- (string trim -- $argv)
|
||||
echo $argv | xclip -selection clipboard
|
||||
return $status
|
||||
end
|
||||
|
||||
xclip -selection clipboard -o
|
||||
end
|
||||
|
||||
|
||||
4
pkgs/fish/functions/into.fish
Normal file
4
pkgs/fish/functions/into.fish
Normal file
@@ -0,0 +1,4 @@
|
||||
function into -a dir
|
||||
mkdir -p $dir
|
||||
cd $dir
|
||||
end
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user