我在 bash 脚本中尝试了以下各种形式:
#!/bin/bash
svn diff $@ --diff-cmd /usr/bin/diff -x "-y -w -p -W $COLUMNS"
但我无法获得正确扩展COLUMNS
环境变量的语法。
我尝试了以下各种形式:
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"
建议?