2

I am relatively new in stow (using for last 6 months). While this is working fine for backing up my config files, it is actually storing unwanted files, and not obeying my .stow-local-ignore.

I am using a script to install stow all my stowed files:

cat ~/bin/stow.sh

#!/usr/bin/env bash

echo "Stowing Dotfiles...";

cd ~/Utility/configs
for file in *; do
  # Only run Stow on the directories in the dotfiles folder and not the individual files.
  # Using 'basename' strips the filepath from the directory name.
  if [ -d ${file} ]; then
    stow  $(basename $file) -t ~/
    echo "$(basename $file) stowed.";
  fi
done

# Return back to the your PWD from before you ran the script
cd ~-

echo 'All stowed';

Now, among many stowed files, lets take the example of vim: The path is: ~/Utility/configs/vim which has the structure:

tree -a -L 2

.
├── .stow-local-ignore
├── .vim
│   ├── autoload
│   ├── plugged
│   ├── spell
│   └── UltiSnips
└── .vimrc

But, inside .vim, I don't want plugged and spells to be stowed, so, I have .stow-local-ignore:

cat .stow-local-ignore

\.vim/plugged
\.vim/spell

But this is not working. I have actually deleted those unwanted dir's and unlinked ~/.vim and restowed, but this does not work. As soon as those files are generated inside ~/.vim, it is stowed.

How I ignore them?

Kindly help.

1 Answer 1

0

fix your .stow-local-ignore as:

/.vim/plugged
/.vim/spell

the backslash you had in the beginning was wrong, use slashes always

INFO: i used slashes on my system and it worked like a charm.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .