[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnu-arch-users] Fai update: now with shell mode
From: |
Jan Hudec |
Subject: |
Re: [Gnu-arch-users] Fai update: now with shell mode |
Date: |
Wed, 28 Jul 2004 11:40:17 +0200 |
User-agent: |
Mutt/1.5.6+20040523i |
On Tue, Jul 27, 2004 at 13:49:22 -0400, Aaron Bentley wrote:
> Hi all,
>
> Just thought I'd post a bit about ongoing Fai development.
> (If you're just tuning in, Fai is a text-based arch frontend.)
>
> The current revision of Fai is;
> address@hidden/fai--dist--0.2--patch-18
> http://sourcecontrol.net/~abentley/archives/tlasrc/
>
> Since the original announcement, I've added the "shell" subcommand,
> which lauches an interactive shell for source management. It features
> completion for:
> - command names
> - native command argument names
> - native command positional parameters
> (It falls back to filename completion.)
Could there be a "complete" subcommand, that would allow non-interactive
call to the completion engine? It would allow easy implementation of
completion in shell, possibly emacs etc.
I think of something like:
fai complete [quoting] the-words
where "[quoting]" would be either --pika or --read and "the-words" would
be the command line up to cursor, broken up to individual arguments.
If a new argument is to be completed, there would be empty argument ('')
at the end. The output would be:
<prefix>
<match1>
<match2>
...
<matchn>
Each of these would be escaped either using pika escapes or suitable for
the POSIX shell read builtin acoording to the first arg.
The possible arguments would be <prefix><match1> ... <prefix><matchn>.
> I haven't sorted out how to handle completion for external (aba)
> commands, and I hope to have native replacements for all tla commands,
> eventually.
Obviously, you can't complete arguments to a command, when you don't
know what arguments they have. Perhaps if they had some special
subcommand, say 'grammar', that gave you spec for the completion...
> [...]
> So far, I haven't had any feedback on Fai, positive or negative, but
> comments are certainly welcome. Give it a try!
Just gave it a try and got:
/home/bulb/src/fai/aba/commands/apply-changeset: 16: Syntax error: Bad
substitution
Traceback (most recent call last):
File "./fai", line 29, in ?
usage()
File "./fai", line 26, in usage
commands.Help().do_command([])
File "/home/bulb/src/fai/commands.py", line 123, in do_command
self.list_commands(native, suggestions, external)
File "/home/bulb/src/fai/commands.py", line 185, in list_commands
fake_aba.list_commands()
File "/home/bulb/src/fai/abacmds.py", line 55, in list_commands
command.command_exec(['desc'])
File "/home/bulb/src/fai/abacmds.py", line 135, in command_exec
expected=expected)
File "/home/bulb/src/fai/arch/util.py", line 66, in exec_safe
proc.wait()
File "/home/bulb/src/fai/arch/util.py", line 307, in wait
raise ExecProblem(self)
File "/home/bulb/src/fai/arch/util.py", line 47, in __init__
error = proc.error.rstrip()
AttributeError: 'NoneType' object has no attribute 'rstrip'
The line in question is:
if [ "${1:0:1}" = "-" ] ; then
It has to be written as:
if expr "$1" : "-"; then
or the first line has to be:
#!/bin/bash
-------------------------------------------------------------------------------
Jan 'Bulb' Hudec
<address@hidden>
signature.asc
Description: Digital signature
- [Gnu-arch-users] Fai update: now with shell mode, Aaron Bentley, 2004/07/27
- Re: [Gnu-arch-users] Fai update: now with shell mode, Jani Monoses, 2004/07/28
- Re: [Gnu-arch-users] Fai update: now with shell mode,
Jan Hudec <=
- Re: [Gnu-arch-users] Fai update: now with shell mode, Aaron Bentley, 2004/07/28
- Re: [Gnu-arch-users] Fai update: now with shell mode, Jan Hudec, 2004/07/28
- Re: [Gnu-arch-users] Fai update: now with shell mode, Aaron Bentley, 2004/07/28
- Re: [Gnu-arch-users] Fai update: now with shell mode, Jan Hudec, 2004/07/28
- Re: [Gnu-arch-users] Fai update: now with shell mode, Aaron Bentley, 2004/07/28
- Re: [Gnu-arch-users] Fai update: now with shell mode, Jan Hudec, 2004/07/29