athityakumar / athityakumar/colorls
Error when combining --gs and --tree
- Dominant language
- Ruby
- Stars
- 5.1k
- Forks
- 396
- PR merge metrics
- No merged PRs in 30d
Description
### Description
I believe this is a new issue; I could not find a dupe.
- Relevant Issues : (none)
- Relevant PRs : (none)
- Type of issue :
- [ ] Installation
- [ ] Font-related
- [ ] Feature request
- [x] Bug in existing feature
- [ ] Developer mode : Code quality / Tests / Documentation
There seems to be an issue when combining `--gs` and `--tree`, e.g.:
```
$ colorls --tree --gs -d -a .oh-my-zsh/custom
Found existing alias for "colorls --tree". You should use: "tree"
└── A? plugins/
│ └────.oh-my-zsh/custom: No such file or directory @ rb_dir_s_empty_p - /home/myself/.oh-my-zsh/custom/somecustompluginfolder
```
Note the wrong path causing the error, should be: `/home/myself/.oh-my-zsh/custom/plugins/somecustompluginfolder`.
Works without `--gs`:
```
$ colorls --tree -d -a .oh-my-zsh/custom
└── plugins/
│ └──── somecustompluginfolder/
│ └──── colorls/
│ └──── git/
│ └──── you-should-use/
│ │ └──── .circleci/
│ │ └──── img/
│ │ └──── tests/
```
Contributor guide
Research direction
Start by reproducing the reported command, `colorls --tree --gs -d -a .oh-my-zsh/custom`, and compare it with the working command without `--gs`. Trace the CLI handling for `--gs` and `--tree` to find where the nested path is formed. Done means the combined options resolve `/home/myself/.oh-my-zsh/custom/plugins/somecustompluginfolder` correctly without the path error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100