-
-
Notifications
You must be signed in to change notification settings - Fork 784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tab completion support #443
Conversation
之后有特性改动,请先在issues上提feature request进行评估后,再提pr,避免有些特性不被采纳导致做无用工作,另外也可以在提pr前,先讨论好实现方案,减少不必要的改动,提高开发效率。。 |
end | ||
if result ~= nil then print(result) end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里需要防止输出多余的空行,应该不会有什么兼容性问题吧。。。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
全局strip还是有点影响的,说不定有些模块就是要输出多个空行呢,尽管这个概率很低,但也不排除这个可能性,这个还是应该让模块自己去控制
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
模块输出不是应该用print?这里是lua脚本返回值的地方
不改这里我的脚本调用以后永远会有一行空行。。。
除非我把最后一个结果留下当返回值。。也太蠢了吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ruki:xmake ruki$ xmake l private.utils.complete xmake l
lua
plugin
hello
global
build
clean
install
uninstall
ruki:xmake ruki$
我没看到有多余空行么?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我不是已经删掉了吗。。。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
哦,你说的是这个 print nil? 我以为你是要在加个 result:trim() 后去 print
print nil这个去掉没啥问题,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我测了下,确实win上显示多了一样,xmake l echo hello 一样也是多了一行,但是 mac下正常
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我测了下win上,似乎跟xmake没啥关系,我把整个 xmake 的主程序入口main代码清空了,啥也不执行,还是会有一行空行。。
而执行系统 echo hello 命令,也会有一行空行,这个似乎是cmd自己加的
在 zsh 和 bash 上也试过了 |
9ef7dba
to
1b5017a
Compare
ok,我先测下 |
我tab 参数的时候 似乎会多加个下划线,而且等号后面会多加个空格:
|
那就是平台处理的问题了,返回的时候只是返回完成列表。 |
win下ok?如果是这样的话,可以对linux/macx下去掉等号好了 |
我在Ubuntu下测了zsh和bash也都没这个问题。。。 |
你看我上面两个截图,尤其是zsh那个。。。 明天再调查下吧 |
嗯 我只在bash下测了,明天我测测zsh 说不定是bash的问题 |
别这么着急啊。。。 |
No description provided.