执行命令后,如上图。
手册中,print命令下有如下说明:
“FISH Variables
One or more FISH symbol names can be given as keywords; their values will be displayed.
If the symbol name is that of a DEFINEd FISH function, then it will be executed (and all functions that it invokes will be executed) before its value will be displayed. If the symbol is a simple FISH variable, then its current value will be displayed.
”
即:一个或多个fish字符名称可以作为print的关键字;执行后会打印出该字符的值。
如果这个字符名称为一个已定义的fish函数(的函数名),那么print + 该字符,将会执行这个fish函数,然后打印出函数返回值。
如果该字符为一个简单的fish变量,那么print+该字符(fish变量),将会打印出该变量的当前值。
ps:个人理解,欢迎指正。