From 0afd3fc6cfdb65048c75ff0238fe75b5c525af14 Mon Sep 17 00:00:00 2001 From: Hadi <112569860+anotherhadi@users.noreply.github.com> Date: Wed, 28 May 2025 10:24:07 +0200 Subject: [PATCH] change chatgpt func Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com> Former-commit-id: b7598a36ee3f72697dfb7b4fc68c3dcd0996e6e5 --- home/programs/shell/zsh.nix | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/home/programs/shell/zsh.nix b/home/programs/shell/zsh.nix index 7e9c8c7..d22d110 100644 --- a/home/programs/shell/zsh.nix +++ b/home/programs/shell/zsh.nix @@ -3,7 +3,7 @@ let fetch = config.theme.fetch; # neofetch, nerdfetch, pfetch in { - home.packages = with pkgs; [ bat ripgrep tldr sesh rmtrash trash-cli]; + home.packages = with pkgs; [ bat ripgrep tldr sesh rmtrash trash-cli ]; home.sessionPath = [ "$HOME/go/bin" ]; @@ -109,13 +109,19 @@ in { sesh connect $session } - function chatgptlist(){ - for arg in "$@"; do - echo "$arg:" - echo "\`\`\`" - cat "$arg" - echo "\`\`\`" - echo + function chatgptfolder(){ + echo "################################" + echo "### TREE ###" + echo "################################" + ${pkgs.eza}/bin/eza --tree -aF --icons never + echo -e "\n\n" + echo "##############################" + echo "### CONTENT ###" + echo "##############################" + find . -type f -not -path '*/.git/*' -print0 | while IFS= read -r -d "" file; do + echo -e "\n--- DEBUT: $file ---\n" + cat "$file" + echo -e "\n--- FIN: $file ---\n" done }