I couldn't set the CWD of $SHELL from extension on_start(). Hints welcomed.
If this could be addressed, that would make it window-manager
independent (but bash & linux-specific).
#### ~/.urxvt/last-directory
> #! perl -w
> sub on_start {
> my ($self) = @_;
> if (open(FH, "/dev/shm/bash-cwd-" . $ENV{"USER"})) {
> my $last_cwd = readline(FH);
> chomp($last_cwd);
> if (-e $last_cwd and -d $last_cwd) {
> print("chdir=" . $last_cwd . "\n");
> ##### Error: this does not work. maybe $self->env ?
> $self->option("chdir", $last_cwd);
> }
> }
> ()
> }
#### ~/.bashrc
> bash_prompt_command() {
> # last path is recorded after every command bash runs
> echo $PWD >| /dev/shm/bash-cwd-$USER
> # [...]
> }
> export -f bash_prompt_command
> export PROMPT_COMMAND=bash_prompt_command
_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/mailman/listinfo/rxvt-unicode