# For every file fd finds, print the first 15 lines
PS> fd --exec-batch bat --line-range=:15 --paging=always
# forcing paging /on/off
PS> fd --exec-batch bat --line-range=:15 --paging=never
Pwsh🐒> # test whether it's resolved by coerce to [type]
'catman' -as 'type' -is 'type'
'batman' -as 'type' -is 'type'
True
False
Pwsh🐒> # test whether it's resolved by coerce to [type]
'catman' -as 'type' -is 'type'
'batman' -as 'type' -is 'type'
True
False
# after
Pwsh🐒> @(
# Declaring a new type in inside a [ScriptBlock]
& {
class batman { [string]$Name }
[batman]
}
# verses dotsourcing a type into the current scope
. {
class catman { [string]$Name }
[catman]
}) | ft -AutoSize
Namespace: <4cf9efd5>
Access Modifiers Name BaseType
------ --------- ---- --------
public class batman object
Namespace: <f2200555>
Access Modifiers Name BaseType
------ --------- ---- --------
public class catman object