stow: No packages to stow or unstow

The following command works:

% pwd
/home/ismail/.dotfiles/.common-dotfiles
% stow --target=/home/ismail/.dotfiles/test .

But the following command does not work:

stow --target=/home/ismail/.dotfiles/test --dir=/home/ismail/.dotfiles/.common-dotfiles

It gives error:

stow: No packages to stow or unstow

How can I give the link of source in stow (instead of using .)?

Asked By: Ahmad Ismail

||

When stowing, you still need to specify what to stow or unstow. With the --dir and --target options, all you’re doing is to tell stow where packages are to be found and where they are to be linked to, but you don’t tell it what to do.

In your case, either of these would work:

stow --target="$HOME/.dotfiles/test" --dir="$HOME/.dotfiles/.common-dotfiles" .
stow --target="$HOME/.dotfiles/test" --dir="$HOME/.dotfiles" .common-dotfiles

(I would personally prefer the second option as it refers to .common-dotfiles as the package to stow from "$HOME/.dotfiles", while the first variation refers to "$HOME/.dotfiles/.common-dotfiles" as the directory containing packages.)

You can also explicitly tell stow that you want to stow a particular package with --stow (or -S):

stow --target="$HOME/.dotfiles/test" --dir="$HOME/.dotfiles" --stow .common-dotfiles
Answered By: Kusalananda
Categories: Answers Tags:
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.