Title: Native globbing on Unix lacks ability to include hidden items · Issue #4683 · PowerShell/PowerShell · GitHub
Open Graph Title: Native globbing on Unix lacks ability to include hidden items · Issue #4683 · PowerShell/PowerShell
X Title: Native globbing on Unix lacks ability to include hidden items · Issue #4683 · PowerShell/PowerShell
Description: Get-Item and Get-ChildItem have the -Force switch for including hidden items in the enumeration / matching of item names. Currently, there is no analog when calling an external utility with a glob (wildcard pattern) argument. Unfortunate...
Open Graph Description: Get-Item and Get-ChildItem have the -Force switch for including hidden items in the enumeration / matching of item names. Currently, there is no analog when calling an external utility with a glob ...
X Description: Get-Item and Get-ChildItem have the -Force switch for including hidden items in the enumeration / matching of item names. Currently, there is no analog when calling an external utility with a glob ...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/4683
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Native globbing on Unix lacks ability to include hidden items","articleBody":"`Get-Item` and `Get-ChildItem` have the `-Force` switch for including _hidden_ items in the enumeration / matching of item names.\r\n\r\nCurrently, there is no analog when calling an external utility with a glob (wildcard pattern) argument.\r\n\r\nUnfortunately, it looks like the only way to provide this ability would be via a new preference variable.\r\n\r\nIn `bash`, it is shell option `dotglob` that controls whether hidden items are included or not.\r\n\r\nCurrent behavior\r\n------------------\r\n\r\n```powershell\r\n# Create temp. dir. for easy experimentation.\r\nPush-Location (New-Item -Force -ItemType Directory -Path ($tmpDir = [io.Path]::GetTempPath() + \"globtest.$PID\"))\r\n# Create a regular and a hidden file.\r\n$null = New-Item -Force -Path 'a', '.a' -ItemType File\r\n\r\n\r\n# This currently returns only 'a', \r\n# with no way to opt into returning the hidden '.a' file too.\r\n' --- printf *'\r\nprintf '%s\\n' *\r\n\r\n# With Get-Item/Get-ChildItem, using -Force opts into including hidden items.\r\n' --- Get-Item -Force *'\r\nGet-Item -Force * | % Name\r\n\r\n# Remove temp. dir.\r\nPop-Location\r\nRemove-Item -Force -Recurse $tmpDir\r\n\r\n```\r\n\r\nEnvironment data\r\n----------------\r\n\r\n\r\n```powershell\r\nPowerShell Core v6.0.0-beta.6 on macOS 10.12.6\r\nPowerShell Core v6.0.0-beta.6 on Ubuntu 16.04.3 LTS\r\n```\r\n","author":{"url":"https://github.com/mklement0","@type":"Person","name":"mklement0"},"datePublished":"2017-08-27T13:42:48Z","url":"https://github.com/PowerShell/PowerShell/issues/4683"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e70d8b45-2279-e699-1020-ced86018f791 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C3FC:2A130F:2892CAA:381F373:6AFD4301 |
| html-safe-nonce | caedc944bf1b57e204506dcb0f283b467f917e2ee2b15ae3f21c23e7f2fa3824 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDM0ZDOjJBMTMwRjoyODkyQ0FBOjM4MUYzNzM6NkFGRDQzMDEiLCJ2aXNpdG9yX2lkIjoiODQ0MDQ4MzQ2NzE5OTU5NTI2NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 66b4f987e8e4b36b8e8c75fa2231e010acf3f5b4281852e24d28e9e660ecabeb |
| hovercard-subject-tag | issue:253164440 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/4683/issue_layout |
| twitter:image | https://opengraph.githubassets.com/286718781d62f5ea8b443dc1021620cf71c2f63482cd2aeab46e03a62c1e8678/PowerShell/PowerShell/issues/4683 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/286718781d62f5ea8b443dc1021620cf71c2f63482cd2aeab46e03a62c1e8678/PowerShell/PowerShell/issues/4683 |
| og:image:alt | Get-Item and Get-ChildItem have the -Force switch for including hidden items in the enumeration / matching of item names. Currently, there is no analog when calling an external utility with a glob ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mklement0 |
| hostname | github.com |
| expected-hostname | github.com |
| None | bdbacc25b921224ff0befcb9e629560a1255be51aec9991d6e3f95b5e9151474 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 556dd37bb0aceffb25724e151b5d858b3265b40b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width