From: Frank Terbeck Date: Sat, 29 Dec 2007 11:24:49 +0000 (+0100) Subject: zshrc: Removing folsym() X-Git-Tag: 0.3.46~6 X-Git-Url: https://git.grml.org/?p=grml-etc-core.git;a=commitdiff_plain;h=6eed6ec8a51ca1e9f2f3f826fdfb44d51a64ebf9 zshrc: Removing folsym() ...which was not exactly beautiful. Just use ssl(), it does the same but looks clean. Added copyright notice to the accept-line wrapper, because our zshrc is GPL'd and the accept-line wrapper code is not. --- diff --git a/etc/skel/.zshrc b/etc/skel/.zshrc index e722f76..6a0e30c 100644 --- a/etc/skel/.zshrc +++ b/etc/skel/.zshrc @@ -604,39 +604,6 @@ show-archive() { fi } -# TODO: isn't ssl() like this, but clean? -# I'd like to remove this, it's a gross hack, IMHO -ft -#f5# Follow symlinks -folsym() { - if [[ -e $1 || -h $1 ]] ; then - file=$1 - else - file=`which $1` - fi - if [[ -e $file || -L $file ]] ; then - if [[ -L $file ]] ; then - echo `ls -ld $file | perl -ane 'print $F[7]'` '->' - folsym `perl -le '$file = $ARGV[0]; - $dest = readlink $file; - if ($dest !~ m{^/}) { - $file =~ s{(/?)[^/]*$}{$1$dest}; - } else { - $file = $dest; - } - $file =~ s{/{2,}}{/}g; - while ($file =~ s{[^/]+/\.\./}{}) { - ; - } - $file =~ s{^(/\.\.)+}{}; - print $file' $file` - else - ls -d $file - fi - else - echo $file - fi -} - # It's shameless stolen from #f5# Use \kbd{vim} as your manpage reader vman() { man $* | col -b | view -c 'set ft=man nomod nolist' - } diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 028354c..89beb36 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -422,6 +422,10 @@ bindkey '^Xi' insert-unicode-char # # For a broader description, see: # +# +# The code is imported from the file 'zsh/functions/accept-line' from +# , which +# distributed under the same terms as zsh itself. # A newly added command will may not be found or will cause false # correction attempts, if you got auto-correction set. By setting the