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

Double dot (..) in the middle of path #3

Closed
sio opened this issue Apr 14, 2021 · 1 comment
Closed

Double dot (..) in the middle of path #3

sio opened this issue Apr 14, 2021 · 1 comment

Comments

@sio
Copy link

sio commented Apr 14, 2021

What to do about . and .. in the middle of path abbreviation? With .. in paths the results would be too unpredictable. Are there any situations when .. show up in path? The user probably wouldn't type it but a command line tool could return such path.

I see double dots in filenames all the time when users create files on Windows where filename extensions are hidden by default. For example, when dealing with personal names: Truman, Harry S..pdf, Truman, H.S..pdf - Windows users just never see the .pdf at the end so no double-dots for them :)

@micouy
Copy link
Owner

micouy commented Apr 14, 2021

Thanks for the issue. Fortunately there is no problem with that case. By . and .. I meant path components 'current dir' and 'parent dir'. For now users can only put . and .. in the beginning of the path, like so:

kn ./../siblingfolder

However, I'm not sure whether kn should allow for abbreviations with the .. component in the middle i.e. foo/bar/../baz. Such abbreviation would cause kn to search for dir matching baz, which has a sibling matching bar, both in dir matching foo. If bar was a symlink, that would be even more complicated.

EDIT: Closing, since there are no problems with this case.

@micouy micouy closed this as completed Apr 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants