小编Rig*_*der的帖子

相当于PowerShell中的Bash别名

新手PowerShell问题:

我想在PowerShell中创建一个完全等同于此Bash别名的别名:

alias django-admin-jy="jython /path/to/jython-dev/dist/bin/django-admin.py"
Run Code Online (Sandbox Code Playgroud)

到目前为止,我一直在修补它,我发现这非常困难.

-PowerShell别名仅适用于PowerShell命令+函数调用

- 无法在PowerShell函数调用上允许无限数量的参数

-PowerShell似乎阻止了stdout


值得注意的是,我已经尝试过这里提出的解决方案:http://huddledmasses.org/powershell-power-user-tips-bash-style-alias-command/

并且在加载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
Run Code Online (Sandbox Code Playgroud)

django powershell

9
推荐指数
1
解决办法
1931
查看次数

在Querystring中嵌入HTTP基本访问身份验证的用户+密码数据

我们正在尝试在请求中测试需要HTTP基本访问身份验证凭据(http://en.wikipedia.org/wiki/Basic_access_authentication)的API.

理想情况下,我们可以通过将所有API参数放在URL查询字符串中来使用Web浏览器测试API,但我们还没有找到一种方法来对查询字符串中的HTTP基本访问身份验证凭据(用户名和密码)进行编码.

有谁知道这样做的方法?

到目前为止,我们尝试过:

https://开头的用户名:password@mydomain.com/

...没有成功.

authentication http

5
推荐指数
1
解决办法
9353
查看次数

标签 统计

authentication ×1

django ×1

http ×1

powershell ×1