Closed Br1ght0ne closed 5 years ago
Heh, you seem to really like these completion scripts :D Hopefully I can get to review this soon but in the meantime you can add a licence header and tabs.
Thank you!
We should probably consider adopting an .editorconfig for the project...
How did you test the script without knowing the path?
$ tcsh
$ cd completions
$ source tmatrix-completion.csh
When one
-
is typed it should also complete suggest completions for with--
.
This is not easy with tcsh
for two reasons:
tcsh
doesn't give you a list of possible completions on double-tapping Tab
, like bash
and zsh
do, so it really does only word completion=
for long options) needs to be specified explicitly for each completion set, so we can't do short and long options at the same time.First point is the key here: tcsh
won't help you to find arguments through a list of possibilities, it just helps you to type the argument you already knew faster.
Surely, I could do something like adding --
to tmatrix_short_options
, but it would change nothing in tcsh
's behaviour with these completions loaded.
There seems to be no "default" path for tcsh
completions. Users are supposed to put their completions wherever they fancy and source
them in ~/.tcshrc
.
Here's an excerpt from git-completion.tcsh
:
# To use this completion script:
#
# 0) You need tcsh 6.16.00 or newer.
# 1) Copy both this file and the bash completion script to ${HOME}.
# You _must_ use the name ${HOME}/.git-completion.bash for the
# bash script.
# (e.g. ~/.git-completion.tcsh and ~/.git-completion.bash).
# 2) Add the following line to your .tcshrc/.cshrc:
# source ~/.git-completion.tcsh
So we can do something like ${HOME}/.tmatrix-completion.tcsh
and instruct users to source
it by themselves.
In that case we can do it in a similar way, just adding a comment instead of CMake commands. I think the 0th point can be dropped because it's not that important and their tcsh completion seems to be tied to the bash completion so that can also be cleared out.
Thanks for the contribution :)
-l
,-r
, ...)--mode=
,--steps-per-sec=
, ...)--help
,--version
)default
,dense
) for--mode=
-c
,-C
)--background
,--color
)--help
and--version
I'm not well-versed in
tcsh
, but this should suffice for now. If somebody with an experience intcsh
completions, it can be changed later.Related to #5.