mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-20 09:09:35 +02:00
fix(preview): a shell prompt's trailing $ or # stays out of its folder link (#604 merge-time fix)
The folder link pattern treats `:` as a boundary and allows `$`/`#` in a path, so every default bash prompt (`user@host:~/proj$`, `root@c:/workspace#`) became a folder link to a path that does not exist, and clicking it showed "Folder not found". folderLinkPath now strips them, so the link opens the prompt's cwd. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
076f62fa1b
commit
9c56f7823d
2 files changed
+8
-1
No files matched your search
@@ -90,6 +90,11 @@ describe('findFilePathLinks', () => {
|
||||
expect(paths('see src/a.ts:120.')).toEqual(['src/a.ts']);
|
||||
});
|
||||
|
||||
it("keeps a shell prompt's trailing `$` or `#` out of the folder it links", () => {
|
||||
expect(paths('arkon@tnode:~/default/claudeman$ ls')).toEqual(['~/default/claudeman']);
|
||||
expect(paths('root@c:/workspace/app# ls')).toEqual(['/workspace/app']);
|
||||
});
|
||||
|
||||
it('still finds rooted absolute paths, and never a relative path inside one', () => {
|
||||
expect(paths('sign-off from /mnt/raid1/x/refs/look_montage.png.')).toEqual(['/mnt/raid1/x/refs/look_montage.png']);
|
||||
// Unknown root: not linked at all (no `nix/store/…` cut out of it).
|
||||
|
||||
Reference in new issue
Block a user