1

Est-ce que ca vous tenterais une completion plus intelligente, ou est qu'on pourrait sans passer.
Par completion intelligente, je pense a la completion programmable telle qu'on trouve dans tcsh-6.02
C'est a dire qu'on peut specifier pour chaque commande quelles sont les fichiers a chercher.
Exemple:
complete cd p/1/d/ # Seulement les rpertoires
complete man p/1/c/ # Seulement les commandes
Etc, sachant que ca coutera quand meme (RAM etROM),

2

Moi je ne pense pas que ce soit indispensable. Si ça nous rapproche trop de la fin du secteur de 64k ce n'est pas trop la peine.
avatar
« Quand le dernier arbre sera abattu, la dernière rivière empoisonnée, le dernier poisson capturé, alors vous découvrirez que l'argent ne se mange pas. »

3

Je pense que ca fait trop gadget pour PedroM moi tongue

4

je trouve pas ça indispensable non plus...
marrant peut-etre (et encore), mais pas indispensable
avatar
Tutorial C (TI-89/92+/v200) - Articles Développement Web (PHP, Javascript, ...)
« What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against? » - Larry Wall

5

Je suis le seul a apprecier donc. Forcement, je suis le seul a l'utiliser tongue
D'ailleurs on peut aussi refuser de completer des mots avec.

6

Je trouve sa indispensable et le mieux serait effectivement de le programmer a la main, et l'ideal serait de rajouter un truc dans le progs kernel pour qu'il exportent leur liste d'argument smile

On pourrait apres meme faire une completion inteligente en tsr pour AMS smile


Tres bonne id PpHd smile
avatar
Proud to be CAKE©®™


GCC4TI importe qui a problème en Autriche, pour l'UE plus et une encore de correspours nucléaire, ce n'est pas ytre d'instérier. L'état très même contraire, toujours reconstruire un pouvoir une choyer d'aucrée de compris le plus mite de genre, ce n'est pas moins)
Stalin est l'élection de la langie.

7

C'est pas de moi.
http://www.polarhome.com:793/manual/tcsh-6.12/complete.tcsh
Ceci est une exemple de fichier de config pour complete sous Unix. Evidement, y'en aura pas temps sous PedroM.

8

Puis comme d'hab, c'est assez lourd si on veut etre compatible.

9

complete [command [word/pattern/list[:select]/[[suffix]/] ...]] (+)
Without arguments, lists all completions. With command, lists completions for command. With command and word etc., defines completions.

command may be a full command name or a glob-pattern (see Filename substitution). It can begin with `-' to indicate that completion should be used only when command is ambiguous.

word specifies which word relative to the current word is to be completed, and may be one of the following:

c
Current-word completion. pattern is a glob-pattern which must match the beginning of the current word on the command line. pattern is ignored when completing the current word.
C
Like c, but includes pattern when completing the current word.
n
Next-word completion. pattern is a glob-pattern which must match the beginning of the previous word on the command line.
N
Like n, but must match the beginning of the word two before the current word.
p
Position-dependent completion. pattern is a numeric range, with the same syntax used to index shell variables, which must include the current word.

list, the list of possible completions, may be one of the following:

a
Aliases
b
Bindings (editor commands)
c
Commands (builtin or external commands)
C
External commands which begin with the supplied path prefix
d
Directories
D
Directories which begin with the supplied path prefix
e
Environment variables
f
Filenames
F
Filenames which begin with the supplied path prefix
g
Groupnames
j
Jobs
l
Limits
n
Nothing
s
Shell variables
S
Signals
t
Plain (``text'') files
T
Plain (``text'') files which begin with the supplied path prefix
v
Any variables
u
Usernames
x
Like n, but prints select when list-choices is used.
X
Completions
$var
Words from the variable var
(...)
Words from the given list
`...`
Words from the output of command

select is an optional glob-pattern. If given, only words from list which match select are considered and the fignore shell variable is ignored. The last three types of completion may not have a select pattern, and x uses select as an explanatory message when the list-choices editor command is used.

suffix is a single character to be appended to a successful completion. If null, no character is appended. If omitted (in which case the fourth delimiter can also be omitted), a slash is appended to directories and a space to other words.

Now for some examples. Some commands take only directories as arguments, so there's no point completing plain files.

> complete cd 'p/1/d/'

completes only the first word following `cd' (`p/1') with a directory. p-type completion can also be used to narrow down command completion:

> co[^D]

complete compress
> complete -co* 'p/0/(compress)/'
> co[^D]
> compress

This completion completes commands (words in position 0, `p/0') which begin with `co' (thus matching `co*') to `compress' (the only word in the list). The leading `-' indicates that this completion is to be used only with ambiguous commands.

> complete find 'n/-user/u/'

is an example of n-type completion. Any word following `find' and immediately following `-user' is completed from the list of users.

> complete cc 'c/-I/d/'

demonstrates c-type completion. Any word following `cc' and beginning with `-I' is completed as a directory. `-I' is not taken as part of the directory because we used lowercase c.

Different lists are useful with different commands.

> complete alias 'p/1/a/'

> complete man 'p/*/c/'
> complete set 'p/1/s/'
> complete true 'p/1/x:Truth has no options./'

These complete words following `alias' with aliases, `man' with commands, and `set' with shell variables. `true' doesn't have any options, so x does nothing when completion is attempted and prints `Truth has no options.' when completion choices are listed.

Note that the man example, and several other examples below, could just as well have used 'c/*' or 'n/*' as 'p/*'.

Words can be completed from a variable evaluated at completion time,

> complete ftp 'p/1/$hostnames/'

> set hostnames = (rtfm.mit.edu tesla.ee.cornell.edu)
> ftp [^D]
rtfm.mit.edu tesla.ee.cornell.edu
> ftp [^C]
> set hostnames = (rtfm.mit.edu tesla.ee.cornell.edu uunet.uu.net)
> ftp [^D]
rtfm.mit.edu tesla.ee.cornell.edu uunet.uu.net

or from a command run at completion time:

> complete kill 'p/*/`ps | awk \{print\ \$1\}`/'

> kill -9 [^D]
23113 23377 23380 23406 23429 23529 23530 PID

Note that the complete command does not itself quote its arguments, so the braces, space and `$' in `{print $1}' must be quoted explicitly.

One command can have multiple completions:

> complete dbx 'p/2/(core)/' 'p/*/c/'

completes the second argument to `dbx' with the word `core' and all other arguments with commands. Note that the positional completion is specified before the next-word completion. Since completions are evaluated from left to right, if the next-word completion were specified first it would always match and the positional completion would never be executed. This is a common mistake when defining a completion.

The select pattern is useful when a command takes only files with particular forms as arguments. For example,

> complete cc 'p/*/f:*.[cao]/'

completes `cc' arguments only to files ending in `.c', `.a', or `.o'. select can also exclude files, using negation of a glob-pattern as described under Filename substitution. One might use

> complete rm 'p/*/f:^*.{c,h,cc,C,tex,1,man,l,y}/'

to exclude precious source code from `rm' completion. Of course, one could still type excluded names manually or override the completion mechanism using the complete-word-raw or list-choices-raw editor commands (q.v.).

The `C', `D', `F' and `T' lists are like `c', `d', `f' and `t' respectively, but they use the select argument in a different way: to restrict completion to files beginning with a particular path prefix. For example, the Elm mail program uses `=' as an abbreviation for one's mail directory. One might use

> complete elm c@=@F:$HOME/Mail/@

to complete `elm -f =' as if it were `elm -f ~/Mail/'. Note that we used `@' instead of `/' to avoid confusion with the select argument, and we used `$HOME' instead of `~' because home directory substitution only works at the beginning of a word.

suffix is used to add a nonstandard suffix (not space or `/' for directories) to completed words.

> complete finger 'c/*@/$hostnames/' 'p/1/u/@'

completes arguments to `finger' from the list of users, appends an `@', and then completes after the `@' from the `hostnames' variable. Note again the order in which the completions are specified.

Finally, here's a complex example for inspiration:

> complete find \

'n/-name/f/' 'n/-newer/f/' 'n/-{,n}cpio/f/' \
'n/-exec/c/' 'n/-ok/c/' 'n/-user/u/' \
'n/-group/g/' 'n/-fstype/(nfs 4.2)/' \
'n/-type/(b c d f l p s)/' \
'c/-/(name newer cpio ncpio exec ok user \
group fstype type atime ctime depth inum \
ls mtime nogroup nouser perm print prune \
size xdev)/' \
'p/*/d/'

This completes words following `-name', `-newer', `-cpio' or `ncpio' (note the pattern which matches both) to files, words following `-exec' or `-ok' to commands, words following `user' and `group' to users and groups respectively and words following `-fstype' or `-type' to members of the given lists. It also completes the switches themselves from the given list (note the use of c-type completion) and completes anything not otherwise completed to a directory. Whew.

Remember that programmed completions are ignored if the word being completed is a tilde substitution (beginning with `~') or a variable (beginning with `$'). complete is an experimental feature, and the syntax may change in future versions of the shell. See also the uncomplete builtin command.

Voici la doc de la commande complete du shell tcsh

10

Franchement, meme si c'est pas aussi complet, sa pourrait bien etre sympa, ne serait-ce que d'afficher en temps reel (ou apres completion) les parametres qu'attend la commande, genre le tooltip sous msvc qui indique les parametres de la fonction
avatar
Proud to be CAKE©®™


GCC4TI importe qui a problème en Autriche, pour l'UE plus et une encore de correspours nucléaire, ce n'est pas ytre d'instérier. L'état très même contraire, toujours reconstruire un pouvoir une choyer d'aucrée de compris le plus mite de genre, ce n'est pas moins)
Stalin est l'élection de la langie.

11

ne serait-ce que d'afficher en temps reel (ou apres completion) les parametres qu'attend la commande

pas mal ça, comme idée...

genre afficher les paramètres dans la status line, une fois la commande tapée...
(un peu comme qd on est dans le catalog sous AMS, avec le curseur sur une fonction)
avatar
Tutorial C (TI-89/92+/v200) - Articles Développement Web (PHP, Javascript, ...)
« What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against? » - Larry Wall

12

Je trouve qu'il faudrait d'abord réussir a corriger les bogues de la completion actuelle(validation du début de la commande uniquement avec le menu, adress error aléatoire parfois, "\" qui ne s'affiche pas toujours après un nom de répertoire, ... ) d'abord avant de penser à implémenter ce "gadget".
avatar

13

1. Qu'appelles-tu validation du debut de la commande avec le menu ?
2. J'ai jamais eu d'adresse error. Pourtant je m'en sers souvent.
3. \ ne s'affiche pas lorsqu'on complete avec le menu
4. Je te jure que je peux plus m'en passer tongue mais faut dire que Linux est plus "completion" dependant que PedroM.

14

1. Le bug dont je t'ai parlé dans le topic PedroM 0.76 - alpha
2. Moi ca m'arrive régulierement sad exemple dans "main" j'ai "stdlib" et "start", je me met dans le repertoire kirby et je tapes "main\s"+ON -> Ca commence à compléter(alors qu'il devrait y avoir le menu puis Adress Error )
3. C'est bien le problème en plus il rajoute un espace. Je pense que ca serait mieux s'il rajoutait \ pour les repertoires.
4. D'accord mais 1,2 et 3 sont a mon avis plus importants
avatar

15

1. Ce probleme n'arrive que sur real ti. Je ne vraiment pas d'ou il vient.
2. Ok
3. au niveau du menu, il ne sait plus si c'est un repertoire ou un fichier, ou une commande smile

16

1. Mais c'est sur real TI que c'est vraiment genant, surtout sur TI89 ou la completion est limite indispensable.
3. Tu pourrais pas le vériffier une fois la sélection faite?
avatar

17

Je sais que la completion est indispensable sous 89. C'est pas pour rien que j'ai fait un menu de selection tongue
c'est juste pour te dire que l'origine du bug m'est compltement inconnue et que je n'ai aucune idee de sa nature (pleonasme)...
3. A la rigueur.

18

Tiens, en parlant de ca, sur 89, il serait pas possible de faire un système rapide pour taper, pke c chiant entre alpha, alpha-lock etc.

Je vais essayer de réfléchir à ça... pour vous soumettre mes idées par la suite smile

19

2. C'est corrige. J'ai aussi ameliore la completion en under_memory conditions.

20

Personnellement, je trouve que la meilleure complétion est celle de Complete de Samuel Stearley.
avatar
Mes news pour calculatrices TI: Ti-Gen
Mes projets PC pour calculatrices TI: TIGCC, CalcForge (CalcForgeLP, Emu-TIGCC)
Mes chans IRC: #tigcc et #inspired sur irc.freequest.net (UTF-8)

Liberté, Égalité, Fraternité

21

Ben moi je trouve ma completion bien plus interressante. Mais chacun ses gouts. Je comprend qu'on puisse aimer avoir un gros menu ouvert en permanence pour completer, contre un menu qui n'apparait qu'a la demande.

22

Si le menu n'apparaît que sur demande, on doit à chaque fois appuyer sur une touche pour faire apparaître le menu. sad
avatar
Mes news pour calculatrices TI: Ti-Gen
Mes projets PC pour calculatrices TI: TIGCC, CalcForge (CalcForgeLP, Emu-TIGCC)
Mes chans IRC: #tigcc et #inspired sur irc.freequest.net (UTF-8)

Liberté, Égalité, Fraternité

23

Il n'apparait que s'il y a ambiguite. S'il n'y a aucune ambiguite, il n'apparait pas. Tu n'as pas teste ?

24

Et alors? Ça fait quand-même une touche de plus à appuyer en cas d'ambiguïté (cas qui est bien plus fréquent que la non-ambiguïté). Et en cas de non-ambiguïté, on ne voit pas ce que la complétion va mettre avant d'appuyer sur la touche. Le menu qui apparaît automatiquement est nettement plus pratique.
avatar
Mes news pour calculatrices TI: Ti-Gen
Mes projets PC pour calculatrices TI: TIGCC, CalcForge (CalcForgeLP, Emu-TIGCC)
Mes chans IRC: #tigcc et #inspired sur irc.freequest.net (UTF-8)

Liberté, Égalité, Fraternité

25

>Et en cas de non-ambiguïté, on ne voit pas ce que la complétion va mettre avant d'appuyer sur la touche.
Heu...
Si on le sait, par l'experience.

>Le menu qui apparaît automatiquement est nettement plus pratique.
Non, a mon avis. Mais si tu penses le contraire tant mieux.