From 24e698a0e46b50c12b190da467bf5d7fa982e823 Mon Sep 17 00:00:00 2001 From: Amand Tihon Date: Tue, 2 Jun 2009 11:59:01 +0200 Subject: [PATCH] Unbreak completion on wrapped commands. --- S40_completion | 1 + S50_aliases | 14 +++++++------- S60_git | 1 + scripts/telnetwrap | 11 ----------- scripts/konsolewrap => wrappers/konsoleautowrap | 1 + wrappers/lftp | 1 + wrappers/rlogin | 1 + wrappers/rsh | 1 + wrappers/sftp | 1 + wrappers/ssh | 1 + wrappers/su | 1 + wrappers/telnet | 1 + 12 files changed, 17 insertions(+), 18 deletions(-) delete mode 100755 scripts/telnetwrap rename scripts/konsolewrap => wrappers/konsoleautowrap (92%) create mode 120000 wrappers/lftp create mode 120000 wrappers/rlogin create mode 120000 wrappers/rsh create mode 120000 wrappers/sftp create mode 120000 wrappers/ssh create mode 120000 wrappers/su create mode 120000 wrappers/telnet diff --git a/S40_completion b/S40_completion index 9e51c62..222bc7f 100644 --- a/S40_completion +++ b/S40_completion @@ -6,6 +6,7 @@ hosts=($( ( \ ) | sort -u)) zstyle ':completion:*:hosts' hosts $hosts +zstyle ':completion:*:(ssh|scp|sftp):*' hosts $hosts zstyle ':completion:*:hosts' list-colors '=(#b)(*)(.lln.iba)=01;30=01;31' '=[^.]#=01;31' users=(atihon ccadmin tcsadmin tcs clinical root) diff --git a/S50_aliases b/S50_aliases index 28b43ae..fd7e6c1 100644 --- a/S50_aliases +++ b/S50_aliases @@ -57,13 +57,13 @@ if [ "$KONSOLE_DCOP_SESSION" ] then if [ `/usr/bin/whoami` != 'root' ] then - alias ssh='~/.zsh.d/scripts/konsolewrap ssh' - alias lftp='~/.zsh.d/scripts/konsolewrap lftp' - alias sftp='~/.zsh.d/scripts/konsolewrap sftp' - alias su='~/.zsh.d/scripts/konsolewrap su' - alias telnet='~/.zsh.d/scripts/konsolewrap telnet' - alias rlogin='~/.zsh.d/scripts/konsolewrap rlogin' - alias rsh='~/.zsh.d/scripts/konsolwrap rsh' + alias ssh='~/.zsh.d/wrappers/ssh' + alias lftp='~/.zsh.d/wrappers/lftp' + alias sftp='~/.zsh.d/wrappers/sftp' + alias su='~/.zsh.d/wrappers/su' + alias telnet='~/.zsh.d/wrappers/telnet' + alias rlogin='~/.zsh.d/wrappers/rlogin' + alias rsh='~/.zsh.d/wrappers/rsh' fi fi diff --git a/S60_git b/S60_git index 433cea7..a1ae51c 100644 --- a/S60_git +++ b/S60_git @@ -1,5 +1,6 @@ #! /usr/bin/zsh + git_parse() { psvar=() diff --git a/scripts/telnetwrap b/scripts/telnetwrap deleted file mode 100755 index a2241ae..0000000 --- a/scripts/telnetwrap +++ /dev/null @@ -1,11 +0,0 @@ -#! /usr/bin/zsh -# This small script renames the konsole tab to the commands' last argument - -typeset -a args -args=$@ -lastarg="${args[(w)-1]}" -dcop ${KONSOLE_DCOP_SESSION} renameSession "$lastarg" -exec $cmd "$@" - - - diff --git a/scripts/konsolewrap b/wrappers/konsoleautowrap similarity index 92% rename from scripts/konsolewrap rename to wrappers/konsoleautowrap index c64ba60..de72cfd 100755 --- a/scripts/konsolewrap +++ b/wrappers/konsoleautowrap @@ -2,6 +2,7 @@ # This small script renames the konsole tab to the commands' last argument typeset -a args +cmd=`basename $0` args=$@ lastarg="${args[(w)-1]}" dcop ${KONSOLE_DCOP_SESSION} renameSession "$lastarg" diff --git a/wrappers/lftp b/wrappers/lftp new file mode 120000 index 0000000..0df2840 --- /dev/null +++ b/wrappers/lftp @@ -0,0 +1 @@ +konsoleautowrap \ No newline at end of file diff --git a/wrappers/rlogin b/wrappers/rlogin new file mode 120000 index 0000000..0df2840 --- /dev/null +++ b/wrappers/rlogin @@ -0,0 +1 @@ +konsoleautowrap \ No newline at end of file diff --git a/wrappers/rsh b/wrappers/rsh new file mode 120000 index 0000000..0df2840 --- /dev/null +++ b/wrappers/rsh @@ -0,0 +1 @@ +konsoleautowrap \ No newline at end of file diff --git a/wrappers/sftp b/wrappers/sftp new file mode 120000 index 0000000..0df2840 --- /dev/null +++ b/wrappers/sftp @@ -0,0 +1 @@ +konsoleautowrap \ No newline at end of file diff --git a/wrappers/ssh b/wrappers/ssh new file mode 120000 index 0000000..0df2840 --- /dev/null +++ b/wrappers/ssh @@ -0,0 +1 @@ +konsoleautowrap \ No newline at end of file diff --git a/wrappers/su b/wrappers/su new file mode 120000 index 0000000..0df2840 --- /dev/null +++ b/wrappers/su @@ -0,0 +1 @@ +konsoleautowrap \ No newline at end of file diff --git a/wrappers/telnet b/wrappers/telnet new file mode 120000 index 0000000..0df2840 --- /dev/null +++ b/wrappers/telnet @@ -0,0 +1 @@ +konsoleautowrap \ No newline at end of file -- 2.39.5