organize
organize copied to clipboard
[v2.0.8] Symbolic links are not detected by `filters.name.startswith`
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
Symbolic links are skipped at the moment. If this is something people are interested in I'll add a switch 👌
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
I'm interest, how do you work around this?
It's not only the name filter, symlinks are always skipped
I'm off the pc for today but I'll add symlink support in the next days
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}"
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.