diff --git a/home/profiles/cli/bin/clear-vim-trash.sh b/home/profiles/cli/bin/clear-vim-trash.sh new file mode 100755 index 00000000..719447ae --- /dev/null +++ b/home/profiles/cli/bin/clear-vim-trash.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +working_directory=$(pwd) +vim_directory="${working_directory//\//%}.vim" +trash "$HOME/.local/share/nvim/sessions/${vim_directory}" diff --git a/home/profiles/cli/default.nix b/home/profiles/cli/default.nix index 07dbb910..ab350fd5 100644 --- a/home/profiles/cli/default.nix +++ b/home/profiles/cli/default.nix @@ -73,6 +73,7 @@ echo "" \ | fzf --phony --preview-window="up:90%" --print-query --preview "jq --color-output -r {q} $input" '') + (pkgs.writeScriptBin "clear-vim-trash" (builtins.readFile ./bin/clear-vim-trash.sh)) (pkgs.writeScriptBin "flakify" '' #!/usr/bin/env zsh if [ ! -e flake.nix ]; then