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
Manually I'd type this:
declare glob_dot_filenames # version 1
ls -la *abc*
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
alias lsd='declare glob_dot_filenames; lsdfunc'
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?
PGP KeyID=0xE8EF4F75 FiPr=5244 5EF3 B0B1 3826 E4EC 8058 7B31 3AD7