Change Matlab Command Window Terminal Type?
12 次查看(过去 30 天)
显示 更早的评论
Hi, I want to run a command (git log -1) via system(), but the problem is that it complains:
>> system('git log -1')
WARNING: terminal is not fully functional
- (press RETURN)
The problem is Matlab will completely freeze if this is run in a script because the command expects RETURN to be pressed before proceeding. The Matlab command window is "dumb":
>> !echo $TERM
dumb
You can test this without git installed:
>> !less --help
WARNING: terminal is not fully functional
@/\less/\help/\file/\@ (press RETURN)
Does anyone know of a way to change the TERM setting or programatically stop the (press RETURN) hanging Matlab when run in a script.
0 个评论
采纳的回答
Walter Roberson
2012-9-21
Assuming you are not using MS Windows, and that your shell is not csh:
system('TERM=ansi git log -1')
or equivalently,
system('export TERM=ansi; git log -1')
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Manage Products 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!