]> git.alrj.org Git - zsh.d.git/commitdiff
Unbreak completion on wrapped commands.
authorAmand Tihon <amand.tihon@iba-group.com>
Tue, 2 Jun 2009 09:59:01 +0000 (11:59 +0200)
committerAmand Tihon <amand.tihon@iba-group.com>
Tue, 2 Jun 2009 09:59:01 +0000 (11:59 +0200)
13 files changed:
S40_completion
S50_aliases
S60_git
scripts/konsolewrap [deleted file]
scripts/telnetwrap [deleted file]
wrappers/konsoleautowrap [new file with mode: 0755]
wrappers/lftp [new symlink]
wrappers/rlogin [new symlink]
wrappers/rsh [new symlink]
wrappers/sftp [new symlink]
wrappers/ssh [new symlink]
wrappers/su [new symlink]
wrappers/telnet [new symlink]

index 9e51c623838eb9aec55eeaaa54581c01c3521793..222bc7f666add876ebee01f6eef8a8d6a007dda8 100644 (file)
@@ -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)
index 28b43ae77cc45c7adc8cf6496784be2cc90f42b5..fd7e6c1d74d90ebb5f3f00c2f488b3c822ec97f1 100644 (file)
@@ -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 433cea7c193a4bca01fd3964fe162849c685fb64..a1ae51c25c1e28636763ac87d3856cf174ec2360 100644 (file)
--- 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 (executable)
index c64ba60..0000000
+++ /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 (executable)
index a2241ae..0000000
+++ /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 (executable)
index 0000000..de72cfd
--- /dev/null
@@ -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 (symlink)
index 0000000..0df2840
--- /dev/null
@@ -0,0 +1 @@
+konsoleautowrap
\ No newline at end of file
diff --git a/wrappers/rlogin b/wrappers/rlogin
new file mode 120000 (symlink)
index 0000000..0df2840
--- /dev/null
@@ -0,0 +1 @@
+konsoleautowrap
\ No newline at end of file
diff --git a/wrappers/rsh b/wrappers/rsh
new file mode 120000 (symlink)
index 0000000..0df2840
--- /dev/null
@@ -0,0 +1 @@
+konsoleautowrap
\ No newline at end of file
diff --git a/wrappers/sftp b/wrappers/sftp
new file mode 120000 (symlink)
index 0000000..0df2840
--- /dev/null
@@ -0,0 +1 @@
+konsoleautowrap
\ No newline at end of file
diff --git a/wrappers/ssh b/wrappers/ssh
new file mode 120000 (symlink)
index 0000000..0df2840
--- /dev/null
@@ -0,0 +1 @@
+konsoleautowrap
\ No newline at end of file
diff --git a/wrappers/su b/wrappers/su
new file mode 120000 (symlink)
index 0000000..0df2840
--- /dev/null
@@ -0,0 +1 @@
+konsoleautowrap
\ No newline at end of file
diff --git a/wrappers/telnet b/wrappers/telnet
new file mode 120000 (symlink)
index 0000000..0df2840
--- /dev/null
@@ -0,0 +1 @@
+konsoleautowrap
\ No newline at end of file