Re: Bash handling of ENOENT on missing files and directories

2017-08-29 Thread Chet Ramey
On 8/29/17 8:40 AM, Jonny Grant wrote: > Hello > > Could bash have some better handling of ENOENT for directories that don't > exist and files that don't exist? Better than the error message the OS associates with that errno? The one that comes straight from strerror()? -- ``The lyf so short, t

Re: Bash handling of ENOENT on missing files and directories

2017-08-29 Thread Greg Wooledge
On Tue, Aug 29, 2017 at 03:40:54PM +0300, Jonny Grant wrote: > (B) is good, but (A) and (C) are problematic below. > > A) > $ cd missingdir > bash: cd: missingdir: No such file or directory How is this a problem? It seems completely clear to me. It tells you what program generated the error, wh

Bash handling of ENOENT on missing files and directories

2017-08-29 Thread Jonny Grant
Hello Could bash have some better handling of ENOENT for directories that don't exist and files that don't exist? (B) is good, but (A) and (C) are problematic below. $ bash --version GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu) A) $ cd missingdir bash: cd: missingdir: No such f