Un newbie PowerShell domanda:Equivalente a Bash alias in PowerShell
Mi piacerebbe fare un alias in PowerShell esattamente equivalente a questo Bash alias:
alias django-admin-jy="jython /path/to/jython-dev/dist/bin/django-admin.py"
In armeggiare con esso finora, ho trovato che questo è molto difficile.
-PowerShell alias funzionano solo con PowerShell comandi + funzione chiama
modo -Non chiaro per consentire un numero illimitato di argomenti su una funzione chiamata PowerShell
-PowerShell sembra bloccare stdout
vale la pena notare che ho provato la soluzione mettere avanti qui: http://huddledmasses.org/powershell-power-user-tips-bash-style-alias-command/
e hanno andare tten il seguente errore di sintassi legati sul caricamento fino PowerShell:
The term 'which' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spell
ing of the name, or if a path was included, verify that the path is correct and try again.
At C:\Users\Dan\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:9 char:27
+ $cmd = @(which <<<< $_.Content)[0]
+ CategoryInfo : ObjectNotFound: (which:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Vorrei poterti dare più di un +1 per aver fatto questa domanda! Molte grazie. –