From b244625d8ae95e4c276c46ea0b46580c9474a776 Mon Sep 17 00:00:00 2001 From: cvsdist Date: Sep 09 2004 15:21:32 +0000 Subject: auto-import changelog data from zsh-4.2.0-1.src.rpm Sat Apr 10 2004 Jens Petersen - 4.2.0-1 - update to 4.2.0 stable release - zsh-4.0.7-bckgrnd-bld-102042.patch no longer needed - add compinit and various commented config improvements to .zshrc (Eric Hattemer,#114887) - include zshprompt.pl in doc dir (Eric Hattemer) - drop setenv function from zshrc --- diff --git a/.cvsignore b/.cvsignore index 8217a4f..ce717d5 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -zsh-4.0.9.tar.bz2 +zsh-4.2.0.tar.bz2 diff --git a/dotzshrc b/dotzshrc index 4738140..1ff4327 100644 --- a/dotzshrc +++ b/dotzshrc @@ -8,3 +8,32 @@ if [ -f /etc/profile ]; then source /etc/profile fi + +autoload -U compinit +compinit + +#allow tab completion in the middle of a word +setopt COMPLETE_IN_WORD + +## keep background processes at full speed +#setopt NOBGNICE +## restart running processes on exit +#setopt HUP + +## history +#setopt APPEND_HISTORY +## for sharing history between zsh processes +#setopt INC_APPEND_HISTORY +#setopt SHARE_HISTORY + +## never ever beep ever +#setopt NO_BEEP + +## automatically decide when to page a list of completions +#LISTMAX=0 + +## disable mail checking +#MAILCHECK=0 + +# autoload -U colors +#colors diff --git a/sources b/sources index 4e553c3..894aab6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -26cc0f9051ba41063e950723246dfaa8 zsh-4.0.9.tar.bz2 +866bcdad8c0c4974650f5eff395a9a35 zsh-4.2.0.tar.bz2 diff --git a/zlogin.rhs b/zlogin.rhs index dd8a889..5b7de4a 100644 --- a/zlogin.rhs +++ b/zlogin.rhs @@ -6,4 +6,3 @@ # msgs, from, etc). # - diff --git a/zprofile.rhs b/zprofile.rhs index 46291ab..177f478 100644 --- a/zprofile.rhs +++ b/zprofile.rhs @@ -2,8 +2,5 @@ # /etc/zprofile and ~/.zprofile are run for login shells # -# all bourne shells should source /etc/profile - - PATH="$PATH:$HOME/bin" export PATH diff --git a/zsh.spec b/zsh.spec index 6b55f5f..6acf03e 100644 --- a/zsh.spec +++ b/zsh.spec @@ -1,9 +1,9 @@ # this file is encoded in UTF-8 -*- coding: utf-8 -*- -Summary: A shell similar to ksh, but with improvements. +Summary: A powerful interactive shell Name: zsh -Version: 4.0.9 -Release: 2.1 +Version: 4.2.0 +Release: 1 License: BSD URL: http://zsh.sunsite.dk/ Group: System Environment/Shells @@ -14,10 +14,10 @@ Source3: zprofile.rhs Source4: zshrc.rhs Source5: zshenv.rhs Source6: dotzshrc +Source7: zshprompt.pl Patch0: zsh-serial.patch Patch1: zsh-4.0.6-make-test-fail.patch -#Patch2: zsh-4.0.7-completion-_files-110852.patch -Patch3: zsh-4.0.7-bckgrnd-bld-102042.patch +#Patch3: zsh-4.0.7-bckgrnd-bld-102042.patch Prereq: fileutils grep /sbin/install-info Buildroot: %{_tmppath}/%{name}-%{version}-root Requires: libcap @@ -53,10 +53,11 @@ This package contains the Zsh manual in html format. %setup -q %patch0 -p1 -b .serial %patch1 -p1 -b .fail -#%%patch2 -p1 -b .orig -%patch3 -p0 -b .bckgrnd -# patch3 touches zshconfig.ac -autoconf +#%%patch3 -p0 -b .bckgrnd +## patch3 touches zshconfig.ac +#autoconf + +cp -p %SOURCE7 . %build %define _bindir /bin @@ -126,7 +127,7 @@ fi %files %defattr(-,root,root) %doc README LICENCE Etc/BUGS Etc/CONTRIBUTORS Etc/FAQ Etc/FEATURES Etc/MACHINES -%doc Etc/NEWS Etc/zsh-development-guide Etc/completion-style-guide +%doc Etc/NEWS Etc/zsh-development-guide Etc/completion-style-guide zshprompt.pl %attr(755,root,root) %{_bindir}/zsh %{_mandir}/*/* %{_infodir}/* @@ -139,6 +140,14 @@ fi %doc Doc/*.html %changelog +* Sat Apr 10 2004 Jens Petersen - 4.2.0-1 +- update to 4.2.0 stable release +- zsh-4.0.7-bckgrnd-bld-102042.patch no longer needed +- add compinit and various commented config improvements to .zshrc + (Eric Hattemer,#114887) +- include zshprompt.pl in doc dir (Eric Hattemer) +- drop setenv function from zshrc + * Tue Mar 02 2004 Elliot Lee - rebuilt @@ -152,7 +161,7 @@ fi configure option by Philippe Troin - configure --with-tcsetpgrp - buildrequire texinfo for makeinfo -- fix ownership of html manual (112749) [Florian La Roche] +- fix ownership of html manual (Florian La Roche, #112749) * Tue Dec 9 2003 Jens Petersen - 4.0.7-3 - no longer "stty erase" in /etc/zshrc for screen [Lon Hohberger] diff --git a/zshprompt.pl b/zshprompt.pl new file mode 100644 index 0000000..b9d5f0f --- /dev/null +++ b/zshprompt.pl @@ -0,0 +1,235 @@ +#!/usr/bin/perl -w + +#requires Gtk-Perl + +use Gtk; +use strict; + +set_locale Gtk; +init Gtk; + +my $window = new Gtk::Window("toplevel"); +$window->signal_connect( "delete_event", \&CloseAppWindow ); +my $table = new Gtk::Table( 20, 6, 0 ); +$window->border_width( 5 ); +#$window->add( $button ); + + +my $prompt = new Gtk::Entry( 128); +my $log = new Gtk::Text(); +$log->set_usize(40,60); +$log->show(); +$prompt->show(); +#$prompt->set_editable (1); +$prompt->set_text(""); +$table->attach( $prompt,0,4,0,4,[ 'expand', 'shrink', 'fill' ], + 'shrink', + 0, 0 ); + +$table->set_row_spacings( 5 ); +$table->set_col_spacings( 5 ); + +my $currDir = new Gtk::Button( "Current Directory" ); +$currDir->show(); +$table->attach_defaults( $currDir,0,1,4,6 ); + +my $errorCode = new Gtk::Button( "Last Return Code" ); +$errorCode->show(); +$table->attach_defaults( $errorCode,1,2,4,6 ); + +my $currTime = new Gtk::Button( "Time" ); +$currTime->show(); +$table->attach_defaults( $currTime,2,3,4,6 ); + +my $hist = new Gtk::Button( "History Number" ); +$hist->show(); +$table->attach_defaults( $hist,3,4,4,6 ); + +my $host = new Gtk::Button( "Hostname" ); +$host->show(); +$table->attach_defaults( $host,0,1,6,8 ); + + + +my $backgroundBlue = new Gtk::Button( "Blue Background" ); +$backgroundBlue->show(); +$table->attach_defaults( $backgroundBlue,0,1,8,10 ); + +my $backgroundRed = new Gtk::Button( "Red Background" ); +$backgroundRed->show(); +$table->attach_defaults( $backgroundRed,1,2,8,10 ); + +my $backgroundGreen = new Gtk::Button( "Green Background" ); +$backgroundGreen->show(); +$table->attach_defaults( $backgroundGreen,2,3,8,10 ); + +my $backgroundYellow = new Gtk::Button( "Yellow Background" ); +$backgroundYellow->show(); +$table->attach_defaults( $backgroundYellow,3,4,8,10 ); + +my $backgroundBlack = new Gtk::Button( "Black Background" ); +$backgroundBlack->show(); +$table->attach_defaults( $backgroundBlack,5,6,8,10 ); + +my $backgroundWhite = new Gtk::Button( "White Background" ); +$backgroundWhite->show(); +$table->attach_defaults( $backgroundWhite,6,7,8,10 ); + +my $backgroundPink = new Gtk::Button( "Pink Background" ); +$backgroundPink->show(); +$table->attach_defaults( $backgroundPink,7,8,8,10 ); + + + + + +my $textBlue = new Gtk::Button( "Blue Text" ); +$textBlue->show(); +$table->attach_defaults( $textBlue,0,1,10,12 ); + +my $textRed = new Gtk::Button( "Red Text" ); +$textRed->show(); +$table->attach_defaults( $textRed,1,2,10,12 ); + +my $textGreen = new Gtk::Button( "Green Text" ); +$textGreen->show(); +$table->attach_defaults( $textGreen,2,3,10,12 ); + +my $textYellow = new Gtk::Button( "Yellow Text" ); +$textYellow->show(); +$table->attach_defaults( $textYellow,3,4,10,12 ); + +my $textBlack = new Gtk::Button( "Black Text" ); +$textBlack->show(); +$table->attach_defaults( $textBlack,5,6,10,12 ); + +my $textWhite = new Gtk::Button( "White Text" ); +$textWhite->show(); +$table->attach_defaults( $textWhite,6,7,10,12 ); + +my $textPink = new Gtk::Button( "Pink Text" ); +$textPink->show(); +$table->attach_defaults( $textPink,7,8,10,12 ); + + +my $textDefault = new Gtk::Button( "Default Text" ); +$textDefault->show(); +$table->attach_defaults( $textDefault,0,1,12,14 ); + +my $backgroundDefault = new Gtk::Button( "Default Background" ); +$backgroundDefault->show(); +$table->attach_defaults( $backgroundDefault,1,2,12,14 ); + + + +my $set = new Gtk::Button( "Save Settings" ); +$set->show(); +$table->attach_defaults( $set,0,1,16,18 ); + +my $xterm = new Gtk::Button( "Test saved settings" ); +$xterm->show(); +$table->attach_defaults( $xterm,1,2,16,18 ); + +$table->attach_defaults( $log,0,6,18,20 ); + + +$currDir->signal_connect( "clicked", \&insertButtonText, "%1/" ); +$errorCode->signal_connect( "clicked", \&insertButtonText, "%?" ); +$currTime->signal_connect( "clicked", \&insertButtonText, "%T" ); +$hist->signal_connect( "clicked", \&insertButtonText, "%!" ); +$host->signal_connect( "clicked", \&insertButtonText, "%m" ); + +$backgroundBlue->signal_connect( "clicked", \&insertButtonText, "%{\$bg[blue]%}" ); +$backgroundRed->signal_connect( "clicked", \&insertButtonText, "%{\$bg[red]%}" ); +$backgroundGreen->signal_connect( "clicked", \&insertButtonText, "%{\$bg[green]%}" ); +$backgroundYellow->signal_connect( "clicked", \&insertButtonText, "%{\$bg[yellow]%}" ); +$backgroundBlack->signal_connect( "clicked", \&insertButtonText, "%{\$bg[black]%}" ); +$backgroundWhite->signal_connect( "clicked", \&insertButtonText, "%{\$bg[white]%}" ); +$backgroundPink->signal_connect( "clicked", \&insertButtonText, "%{\$bg[magenta]%}" ); +$backgroundDefault->signal_connect( "clicked", \&insertButtonText, "%{\$bg[default]%}" ); + + + + +$textBlue->signal_connect( "clicked", \&insertButtonText, "%{\$fg[blue]%}" ); +$textRed->signal_connect( "clicked", \&insertButtonText, "%{\$fg[red]%}" ); +$textGreen->signal_connect( "clicked", \&insertButtonText, "%{\$fg[green]%}" ); +$textYellow->signal_connect( "clicked", \&insertButtonText, "%{\$fg[yellow]%}" ); +$textBlack->signal_connect( "clicked", \&insertButtonText, "%{\$fg[black]%}" ); +$textWhite->signal_connect( "clicked", \&insertButtonText, "%{\$fg[white]%}" ); +$textPink->signal_connect( "clicked", \&insertButtonText, "%{\$fg[magenta]%}" ); +$textDefault->signal_connect( "clicked", \&insertButtonText, "%{\$fg[default]%}" ); + + + + + +$set->signal_connect( "clicked", \&pushEnv ); +$xterm->signal_connect( "clicked", \&xterm ); + +sub xterm +{ +my $string="xterm -e zsh -li&"; +#$string.=$prompt->get_text(); + +#$string.="' zsh -li\"& "; + +system($string); +# $prompt->append_text( $string ); +$log->insert( "", "white", "black", "executing:\n $string\n"); +} + + +sub pushEnv +{ +chdir("~"); +use Env qw(PS1); +my $pNotSet=0; +open(PROMPT, "+<", ".prompt") or $pNotSet=1; + + +if($pNotSet) +{ + #$prompt->insert( "", "white", "black", "prompt is not set"); + open(ZSHRC, '>>','.zshrc') or die "cannot open zshrc"; + print ZSHRC ". ~/.prompt\n"; + close (ZSHRC); +} +close (PROMPT); +open(PROMPT, ">", ".prompt"); +print PROMPT "export PS1=\"",$prompt->get_text(),"\"\n"; + +#$prompt->insert( "", "white", "black", $PS1); + +close(PROMPT); +close(ZSHRC); +$prompt->grab_focus(); + +} +$prompt->can_default(1); +$prompt->grab_default(); +$table->show(); +$window->add( $table ); + + + + +$window->show(); +$prompt->grab_focus(); +main Gtk; + +exit( 0 ); + +sub CloseAppWindow +{ + Gtk->exit( 0 ); + return 0; +} + + +sub insertButtonText +{ + my ($widget, $txt) = @_; + $prompt->append_text( $txt ); +$prompt->grab_focus(); +} diff --git a/zshrc.rhs b/zshrc.rhs index 0a6361b..f0f35a4 100644 --- a/zshrc.rhs +++ b/zshrc.rhs @@ -4,8 +4,8 @@ # options, key bindings, etc. # -# Shell functions -setenv() { export $1=$2 } # csh compatibility +## shell functions +#setenv() { export $1=$2 } # csh compatibility # Set prompts PROMPT='[%n@%m]%~%# ' # default prompt