2009-11-02 55 views
3

什麼是Powershell相當於Perl的qw()函數?在第2版中,我可以使用-split來編寫我自己的代碼,但是我假設有一種在文檔中找不到的退出方法。Powershell模擬到'quote words'

回答

3

我們包括在PowerShell Community Extensions如此功能:

PS> quote-list hello world 
hello 
world 
PS> ql hello world # using alias 
hello 
world 

如果你不想安裝PSCX,功能很簡單:

Set-Alias ql Quote-List 
function Quote-List {$args} 
+0

我被關在木箱希望的功能,但我會認爲這沒有一個。謝謝。 – 2009-11-02 21:43:57

+0

不,不是開箱即用,但所有事情都考慮到了,添加到您的個人資料非常容易。 – 2009-11-02 22:41:53