8000 Symlinks to dirs on MacOS not traversed by shell · Issue #1958 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content
Symlinks to dirs on MacOS not traversed by shell #1958
@jaraco

Description

@jaraco

Steps to reproduce

$ mkdir bar
$ ln -s bar foo
$ ls -lad foo bar
drwxr-xr-x  2 jaraco  staff  68 Aug 19 11:52 bar
lrwxr-xr-x  1 jaraco  staff   3 Aug 19 11:52 foo -> bar
$ powershell
PowerShell 
Copyright (C) 2016 Microsoft Corporation. All rights reserved.

PS /Users/jaraco> dir foo                                                                         


    Directory: /Users/jaraco


Mode                LastWriteTime         Length Name                                            
----                -------------         ------ ----                                            
d----l          8/19/16  11:52 AM                foo                                             


PS /Users/jaraco> cat > foo/text.txt                                                              
this is a file
PS /Users/jaraco> ls foo                                                                          
text.txt
PS /Users/jaraco> dir foo                                                                         


    Directory: /Users/jaraco


Mode                LastWriteTime         Length Name                                            
----                -------------         ------ ----                                            
d----l          8/19/16  11:52 AM                foo                                             


Although the symbolic link seems to be honored for cat, it's not honored for tab completion or dir.

Expected behavior

The symbolic link should be treated like its target for tab completion and dir, as symbolic links are in Windows Powershell or bash. dir foo should render identical to dir bar. Tab completion on foo/ should complete with the text file.

Actual behavior

The symbolic links seem to be treated like simple files.

Environment data

> $PSVersionTable

Name                           Value                                                             
----                           -----                                                             
PSVersion                      6.0.0-alpha                                                       
PSEdition                      Core                                                              
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                           
BuildVersion                   3.0.0.0                                                           
GitCommitId                    v6.0.0-alpha.9                                                    
CLRVersion                                                                                       
WSManStackVersion              3.0                                                               
PSRemotingProtocolVersion      2.3                                                               
SerializationVersion           1.1.0.1         

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0