我有一堆嵌套的 if..then...fi 的
if [ "${var}" = "NA" ]
then
if [ "$var" != "SAM" -a "$fileFormat" != "XED" -a "$Format" != "TED" -a "$Format" != "ESTA" ]
then
echo "ERROR: Input file format not recognised"
echo "use --help for more information"
exit 1
fi
#convert esta to ted - start
if [ $fileFormat = "ESTA" ]
then
if [ $ENO != "NA" ]
then
ENO=$(greadlink -e ${ENO} )
fi
if [ -z "$output" ]
then
echo "WARNING"
echo "No output directory specified. Using current working directory, " $(pwd)/OUTPUT
output=$(pwd)/OUTPUT
fi
InputTed=$(greadlink -e ${Inputted}) #greadlink - to canonicanize/normalize to standard format
mkdir -p ${output}
cd ${output}
output=$(greadlink -e $(pwd) )
DIRECTORY=$(pwd)
在一个2000多行的shell脚本中。我想单击开头的 if,并突出显示结尾的 fi,以便轻松导航代码,就像使用大括号一样。我正在使用 PHPStorm、vscode,但很高兴尝试任何可以开箱即用的免费文本编辑器或这些工具的任何插件。