我在 bash 脚本中尝试了以下各种形式:
#!/bin/bash
svn diff $@ --diff-cmd /usr/bin/diff -x "-y -w -p -W $COLUMNS"
但是我无法正确地使用语法来展开 ABc0环境变量。
我尝试了以下各种形式:
svn diff $@ --diff-cmd /usr/bin/diff -x '-y -w -p -W $COLUMNS'
还有
svn diff $@ --diff-cmd /usr/bin/diff -x '-y -w -p -W ${COLUMNS}'
还有
eval svn diff $@ --diff-cmd /usr/bin/diff -x "-y -w -p -W $COLUMNS"
有什么建议吗?