如何在csh中获取第二个参数直到最后一个?

时间:2016-10-06 01:31:59

标签: linux shell alias csh review-board

我想为# Project-wide Gradle settings. # IDE (e.g. Android Studio) users: # Gradle settings configured through the IDE *will override* # any settings specified in this file. # For more details on how to configure your build environment visit # http://www.gradle.org/docs/current/userguide/build_environment.html # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. org.gradle.jvmargs=-Xmx2048m # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true 命令创建别名。我认为应该是:

rbt

预期的结果是我跑

的时候
alias myrbt 'rbt \!:1 --server=myserver --repository-url=myurl \!:2- \!:$'

它应该运行

myrbt diff 12345

当我跑

rbt diff --server=myserver --repository-url=myurl 12345

它应该运行

myrbt post 1.py 2.py

......但它没有用。

1 个答案:

答案 0 :(得分:1)

我认为这就是你要找的东西?

# Replace `echo` with `rbt`
$ alias myrbt 'echo \!:1 --server=myserver --repository-url=myurl \!:2*'

$ myrbt diff 12345
post --server=myserver --repository-url=myurl 12345

$ myrbt post 1.py 2.py
post --server=myserver --repository-url=myurl 1.py 2.py

您的版本不起作用的原因是\!:2-如果只有两个参数(至少需要三个),SUCCEEDED(hr) rc.right == m_GfxWindow->GetWidth() && rc.bottom == m_GfxWindow->GetHeight() 似乎不起作用。