Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v2.0.8] Symbolic links are not detected by filters.name.startswith #178

Open
andreoliwa opened this issue Feb 9, 2022 · 6 comments
Open

Comments

@andreoliwa
Copy link

andreoliwa commented Feb 9, 2022

Rule:

rules:
  - name: "Echo .bash files on the root"
    locations: ~/
    filters:
      - name:
          startswith: .bash
    actions:
      - echo: "{name}"

Output:

❯ organize run
organize 2.0.8
Config: "/Users/aa/Library/Application Support/organize/config.yaml"

⚙ Echo .bash files on the root ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
/Users/aa
  .bash_history
    - (echo) .bash_history

My root files (.bash_history is an actual file, the others are symlinks):

❯ ls -1 ~/.bash*
/Users/aa/.bash_history
/Users/aa/.bash_profile -> /Users/aa/dotfiles/roles/bash/files/.bash_profile.sh
/Users/aa/.bashrc -> /Users/aa/dotfiles/roles/bash/files/.bashrc.sh
@tfeldmann
Copy link
Owner

Symbolic links are skipped at the moment. If this is something people are interested in I'll add a switch 👌

@andreoliwa
Copy link
Author

I found a workaround, but I think it's nice to have.

Also, it's not mentioned on the docs: https://organize.readthedocs.io/en/latest/filters/#name

@tfeldmann
Copy link
Owner

I'm interest, how do you work around this?

It's not only the name filter, symlinks are always skipped

@tfeldmann
Copy link
Owner

I'm off the pc for today but I'll add symlink support in the next days

@andreoliwa
Copy link
Author

I'm interest, how do you work around this?

Oh, nothing magical...
I just used the file directly and avoided the symlinks. 😬

rules:
  - name: "Echo .bash files on the root"
    locations: ~/
    filters:
      - name: .bash_history
    actions:
      - echo: "{name}"

@xdhmoore
Copy link
Contributor

xdhmoore commented Jun 21, 2022

I ran into a similar issue trying to move a file to a symlink of a folder on Win 10. Organize creates a new folder instead with the same name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants