MATLAB warns about terminal not being fully functional when using System command (!)
19 次查看(过去 30 天)
显示 更早的评论
MathWorks Support Team
2019-11-6
回答: MathWorks Support Team
2020-7-28
I try to use Bash commands (git) under Linux in MATLAB using the system command or its operator (!).
The command 'git log -1' yields the following behavior. How can I solve this?

The message says the following:
WARNING: terminal is not fully functional
采纳的回答
MathWorks Support Team
2019-11-6
This happens because when MATLAB's system command executes it uses its own environment and not the environment that MATLAB was first started from.
The following works because MATLAB can see and set the environment variable before running the git command.
system('TERM=ansi; git <any command>')
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Source Control 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!