Fixed infinite freeze
This commit is contained in:
parent
ac120b6a27
commit
88b6573952
3 changed files with 38 additions and 29 deletions
|
@ -15,7 +15,7 @@ function __yay_tar
|
||||||
echo " -v, --verbose Enable verbose output"
|
echo " -v, --verbose Enable verbose output"
|
||||||
echo " -h, --help Show this help message"
|
echo " -h, --help Show this help message"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Supported compression types: :D"
|
echo "Supported compression types:"
|
||||||
echo " 7zip - .7z or .tar.7z (levels: 0-9, default 5, threads: yes)"
|
echo " 7zip - .7z or .tar.7z (levels: 0-9, default 5, threads: yes)"
|
||||||
echo " bzip2 - .tar.bz2 (levels: 1-9, default 9)"
|
echo " bzip2 - .tar.bz2 (levels: 1-9, default 9)"
|
||||||
echo " bzip3 - .tar.bz3 (block size in MiB: 1-511, default 16, threads: yes)"
|
echo " bzip3 - .tar.bz3 (block size in MiB: 1-511, default 16, threads: yes)"
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
#!/usr/bin/env fish
|
#!/usr/bin/env fish
|
||||||
|
|
||||||
# Main dispatch
|
function yay_function
|
||||||
if test (count $argv) -eq 0
|
# Main dispatch
|
||||||
|
if test (count $argv) -eq 0
|
||||||
|
echo "yay! :D"
|
||||||
echo "Usage: yay <command> [args]"
|
echo "Usage: yay <command> [args]"
|
||||||
echo "Commands: rebuild, update, garbage, try, tar, untar"
|
echo "Commands: rebuild, update, garbage, try, tar, untar"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -24,3 +26,9 @@ if test (count $argv) -eq 0
|
||||||
__yay_red "Unknown subcommand: $argv[1]"
|
__yay_red "Unknown subcommand: $argv[1]"
|
||||||
exit 1
|
exit 1
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# For direct fish shell usage
|
||||||
|
function yay
|
||||||
|
yay_function $argv
|
||||||
|
end
|
|
@ -14,11 +14,11 @@ let
|
||||||
cp ${../share/fish/completions}/yay.fish $out/share/fish/completions/
|
cp ${../share/fish/completions}/yay.fish $out/share/fish/completions/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Create main yay binary that ensures fish is available
|
# Create main yay binary that uses fish's function path
|
||||||
yayBin = pkgs.writeShellScriptBin "yay" ''
|
yayBin = pkgs.writeShellScriptBin "yay" ''
|
||||||
exec ${pkgs.fish}/bin/fish -c "yay $*"
|
FUNCTIONS_DIR=$(dirname $(dirname $0))/share/fish/functions
|
||||||
|
exec ${lib.getExe pkgs.fish} -c "set fish_function_path \$fish_function_path $FUNCTIONS_DIR; source $FUNCTIONS_DIR/yay.fish; yay_function $@"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
in
|
in
|
||||||
pkgs.symlinkJoin {
|
pkgs.symlinkJoin {
|
||||||
name = "yay";
|
name = "yay";
|
||||||
|
@ -34,6 +34,7 @@ pkgs.symlinkJoin {
|
||||||
wrapProgram $out/bin/yay \
|
wrapProgram $out/bin/yay \
|
||||||
--prefix PATH : ${
|
--prefix PATH : ${
|
||||||
lib.makeBinPath [
|
lib.makeBinPath [
|
||||||
|
pkgs.fish
|
||||||
pkgs.nh
|
pkgs.nh
|
||||||
pkgs.jq
|
pkgs.jq
|
||||||
pkgs.gzip
|
pkgs.gzip
|
||||||
|
|
Loading…
Add table
Reference in a new issue