From: Amand Tihon Date: Tue, 2 Jun 2009 09:59:01 +0000 (+0200) Subject: Unbreak completion on wrapped commands. X-Git-Url: https://git.alrj.org/?p=zsh.d.git;a=commitdiff_plain;h=24e698a0e46b50c12b190da467bf5d7fa982e823 Unbreak completion on wrapped commands. --- 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/konsolewrap b/scripts/konsolewrap deleted file mode 100755 index c64ba60..0000000 --- a/scripts/konsolewrap +++ /dev/null @@ -1,9 +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/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/wrappers/konsoleautowrap b/wrappers/konsoleautowrap new file mode 100755 index 0000000..de72cfd --- /dev/null +++ b/wrappers/konsoleautowrap @@ -0,0 +1,10 @@ +#! /usr/bin/zsh +# 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" +exec $cmd "$@" + 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