[arch-projects] [INITSCRIPTS][PATCH 1/6] Improve coloring on light and transparent term
This patch improve coloring in light and transparent term.
It uses tput if available
\033 are remplaced by \e
Signed-off-by: Sebastien Luttringer
- print daemon text with C_CLEAR and not C_MAIN
- print rc name based on $0 (in case of renaming)
Signed-off-by: Sebastien Luttringer
To avoid conflict with plan9 rc shell we need to rename our rc.
Original name come from debian invoke-rc.d, shortened into rc.
Signed-off-by: Sebastien Luttringer
With new name of script, vim doesn't reconize correctly file format. We need to set it explicitly.
Signed-off-by: Sebastien Luttringer
We need to do this to allow a correct detection of terminal colors in functions sourced by rc.d scripts
Signed-off-by: Sebastien Luttringer
Signed-off-by: Sebastien Luttringer
just a remember about bash rc.d script. But i have a zsh one pending too.
On Thu, May 5, 2011 at 3:04 AM, Sebastien Luttringer
Signed-off-by: Sebastien Luttringer
--- Makefile | 3 ++- bash-completion | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletions(-) create mode 100644 bash-completion diff --git a/Makefile b/Makefile index 6923840..69f008a 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ VER := $(shell git describe) -DIRS := /etc/rc.d /etc/conf.d /etc/rc.d/functions.d /etc/cron.hourly /sbin +DIRS := /etc/rc.d /etc/conf.d /etc/rc.d/functions.d /etc/cron.hourly /sbin /etc/bash_completion.d
minilogd: minilogd.o
@@ -13,6 +13,7 @@ install: minilogd installdirs install -m755 -t $(DESTDIR)/etc/cron.hourly adjtime install -m755 -t $(DESTDIR)/etc/rc.d functions hwclock network netfs install -m755 -t $(DESTDIR)/sbin minilogd rc.d + install -m644 -T bash-completion $(DESTDIR)/etc/bash_completion.d/rc.d
clean: rm -f minilogd minilogd.o diff --git a/bash-completion b/bash-completion new file mode 100644 index 0000000..3b0f464 --- /dev/null +++ b/bash-completion @@ -0,0 +1,18 @@ +# rc.d bash completion by Seblu
+ +_rc.d () +{ + local action="help list start stop reload restart" + local cur="${COMP_WORDS[COMP_CWORD]}" + local caction="${COMP_WORDS[1]}" + if ((${COMP_CWORD} == 1)); then + COMPREPLY=($(compgen -W "${action}" -- "$cur")) + elif [[ "$caction" == "help" || "$caction" == "list" ]]; then + COMPREPLY=() + elif ((${COMP_CWORD} > 1)); then + COMPREPLY=($( compgen -W "$(find /etc/rc.d -maxdepth 1 -type f -executable -printf '%f\n')" -- "$cur" )) + fi +} +complete -F _rc.d rc.d + +# vim: set ts=2 sw=2 ft=sh noet: -- Sebastien "Seblu" Luttringer
-- Sébastien Luttringer www.seblu.net
Hi Sébastien,
Is your branch on github ready to be reviewed now? I think you
implemented some suggestions I made, but I don't know if you finished.
Did you have a look at the other bash completion patch on the list to
see if it adds anything not already in this patch?
-t
On Wed, May 18, 2011 at 9:03 PM, Seblu
just a remember about bash rc.d script. But i have a zsh one pending too.
On Thu, May 5, 2011 at 3:04 AM, Sebastien Luttringer
wrote: Signed-off-by: Sebastien Luttringer
--- Makefile | 3 ++- bash-completion | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletions(-) create mode 100644 bash-completion diff --git a/Makefile b/Makefile index 6923840..69f008a 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ VER := $(shell git describe) -DIRS := /etc/rc.d /etc/conf.d /etc/rc.d/functions.d /etc/cron.hourly /sbin +DIRS := /etc/rc.d /etc/conf.d /etc/rc.d/functions.d /etc/cron.hourly /sbin /etc/bash_completion.d
minilogd: minilogd.o
@@ -13,6 +13,7 @@ install: minilogd installdirs install -m755 -t $(DESTDIR)/etc/cron.hourly adjtime install -m755 -t $(DESTDIR)/etc/rc.d functions hwclock network netfs install -m755 -t $(DESTDIR)/sbin minilogd rc.d + install -m644 -T bash-completion $(DESTDIR)/etc/bash_completion.d/rc.d
clean: rm -f minilogd minilogd.o diff --git a/bash-completion b/bash-completion new file mode 100644 index 0000000..3b0f464 --- /dev/null +++ b/bash-completion @@ -0,0 +1,18 @@ +# rc.d bash completion by Seblu
+ +_rc.d () +{ + local action="help list start stop reload restart" + local cur="${COMP_WORDS[COMP_CWORD]}" + local caction="${COMP_WORDS[1]}" + if ((${COMP_CWORD} == 1)); then + COMPREPLY=($(compgen -W "${action}" -- "$cur")) + elif [[ "$caction" == "help" || "$caction" == "list" ]]; then + COMPREPLY=() + elif ((${COMP_CWORD} > 1)); then + COMPREPLY=($( compgen -W "$(find /etc/rc.d -maxdepth 1 -type f -executable -printf '%f\n')" -- "$cur" )) + fi +} +complete -F _rc.d rc.d + +# vim: set ts=2 sw=2 ft=sh noet: -- Sebastien "Seblu" Luttringer -- Sébastien Luttringer www.seblu.net
On Wed, May 18, 2011 at 9:08 PM, Tom Gundersen
Hi Sébastien,
Is your branch on github ready to be reviewed now? I think you implemented some suggestions I made, but I don't know if you finished. As you ask me, i sent patch on project to review and let you pull when you think it's good. Ok i will sent you mail about pull request.
Did you have a look at the other bash completion patch on the list to see if it adds anything not already in this patch?
Not yet. I just works be done twice. I will look if something is better implemented and a zsh completion is in AUR. i will send you more tonight. -- Sébastien Luttringer www.seblu.net
participants (3)
-
Sebastien Luttringer
-
Seblu
-
Tom Gundersen