bash: glob_dot_filenames

bash: glob_dot_filenames

Post by Martin Rams » Mon, 01 Nov 1999 03:00:00



Hi all,

using Bash V1.14.7(1) I'd like to define a shell function or an alias
which lists files (as ls does), but temporaryly doesn't treat dot
files special.

Manually I'd type this:

  declare glob_dot_filenames                    # version 1
  ls -la *abc*
  unset glob_dot_filenames

Or better (for it leaves the state of glob_dot_filenames unchanged):

  ( declare glob_dot_filenames; ls -la *abc* )  # version 2

But how to define a new command 'lsd' to behave like this?

What I've done so far is a combination of both an alias and a shell
function:

  alias lsd='declare glob_dot_filenames; lsdfunc'
Now
  lsd *abc*
does what I want.
But this is like version 1 above.

What I'd like to have is an equvalent to version 2 above, that doesn't
blindly unset glob_dot_filenames, but restores the previous state.
How could I do that most elegantly?

Regards,
  Martin
--

PGP KeyID=0xE8EF4F75 FiPr=5244 5EF3 B0B1 3826  E4EC 8058 7B31 3AD7

 
 
 

1. BASH BASH BASH BASH BASH BASH BASH BASH BASH BASH

Is there a proper fixed bash on any of the FTP sites out there?

I know there bash is on the usual sites but I don't know if they are
bugged or not :(

Regards,

Neil.

--


------------------------------------| Edinburgh, EH14 2DE, United Kingdom
**Domino: There`s nothing you can do when you`re the next in line: Domino**

2. Is This Possible?

3. Bashing bash (Was Re: bash or user error with set -e and subshells)

4. Not able to compile anymore

5. Bash calls TCL, TCL calls Bash, 2nd Bash never reads input

6. HTML driven to-do list

7. Bash/CGI - - HTML call to Bash script

8. MIPS Avalanche bus details?

9. difference in behaviour of bash-2.0 from bash-1.14.7

10. (patch for Bash) Bash with embedded Python

11. co-processes and bash (ksh does it, can bash?)

12. Stupid BASH BASH EXPORT PS1 and path to X Question

13. changing bash to "bash -noprofile"