Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 158689 - app-shells/bash - Strengthen the directory semantics in bash
Summary: app-shells/bash - Strengthen the directory semantics in bash
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-20 16:48 UTC by Alessandro Di Marco
Modified: 2006-12-21 23:49 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Silly patching ebuild (just applies lazycd patch below.) (bash-3.1_p17.ebuild,4.96 KB, text/plain)
2006-12-20 16:51 UTC, Alessandro Di Marco
Details
LazyCD patch (bash-3.1-lazycd.patch,4.81 KB, patch)
2006-12-20 17:02 UTC, Alessandro Di Marco
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alessandro Di Marco 2006-12-20 16:48:40 UTC
Involves two major changements in bash usage. 

First, you won't need the cd command anymore: to enter a directory, simply go with its name as it would be a command, and let bash take the most appropriate action depending on the type, permissions, etc of the corresponding object.

Second, you'll win triggers: every directory accessed in the lazy-way (without the cd builtin) will trig two I/O batches, called '.getin' and '.getout'. More precisely the '.getout' batch of the leaving directory (if present) will be executed before than the '.getin' batch of the entering directory (if present as well). In other words - except for the chdir side-effect - entering in a directory is now pretty equivalent to execute its triggers (when available). Clearly this opens new ways of user's interaction and system development (think about bash callbacks for example.)

NOTICE

This patch has been successfully tested for nearly one year on several production workstations. However, in case of problems you can inhibit its functioning via the LAZY_DISABLE variable. Please keep in mind that _often_ such problems are due to bugs in the target scripts and _not_ in the lazycd code itself (see RCS ebuild as a good exponent of such cases.)

Sooner or later I'll submit LazyCD to the mainstream, but in the meantime comments are welcome (dmr@gmx.it).
Comment 1 Alessandro Di Marco 2006-12-20 16:51:57 UTC
Created attachment 104474 [details]
Silly patching ebuild (just applies lazycd patch below.)
Comment 2 Alessandro Di Marco 2006-12-20 17:02:31 UTC
Created attachment 104476 [details, diff]
LazyCD patch
Comment 3 SpanKY gentoo-dev 2006-12-21 06:30:46 UTC
i imagine some people would like this change, but i think that it'd break default spec defined behavior and for many, that would simply not be acceptable

i would very much prefer it to go upstream, but i'm 99% sure upstream would reject it ... but i'm not upstream, so what do i know :)
Comment 4 Alessandro Di Marco 2006-12-21 08:42:40 UTC
(In reply to comment #3)
> i imagine some people would like this change, but i think that it'd break
> default spec defined behavior and for many, that would simply not be acceptable
> 
> i would very much prefer it to go upstream, but i'm 99% sure upstream would
> reject it ... but i'm not upstream, so what do i know :)

...and this is the very reason why I haven't submitted it to the upstream yet - really I have no time to vaste in discussions :-) 

Anyway if someone would give it a chance, I'll be glad to receive your feedback : comments, ideas, insults are welcome :-). Newer versions of lazycd will be posted right here: http://www.c0nc3pt.com/patches/bash-lazy-cd 

Bye
Comment 5 SpanKY gentoo-dev 2006-12-21 23:49:20 UTC
personally, i dont think i'd use the patch ... i typo things too often and i think your semantic changes would accept it as lazy input :)

you could try and find peeps on the forums ... there are always people willing to run just about anything