LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   zenity - hiding hidden files from file selections (https://www.linuxquestions.org/questions/programming-9/zenity-hiding-hidden-files-from-file-selections-831705/)

josephj 09-12-2010 10:24 AM

zenity - hiding hidden files from file selections
 
I'm using zenity 2.28.0 in a bash script (under kde4) to select multiple files in a directory. It works fine, but always defaults to showing hidden files.

How can I get it to hide hidden files by default?

I know about toggling them on and off with Ctrl-H, but I would prefer not to have to use that.

I have my options set so that dolphin and konqueror do not show hidden files by default. I even tried adding shopt -u dotglob to my script.

TIA

Joe

kubuntu karmic

zenity invocation (extracted from a more complex statement):
zenity --title "Select Print Files to Delete" --file-selection --multiple

unSpawn 10-11-2010 03:39 PM

As far as I know Zenity does not provide that type of selection filter.

josephj 10-12-2010 12:35 PM

A friend at the local lug found it for me. It's in the help files, but only if you get help on the file-selection command itself. It's kind of like an Easter egg.

zenity --title "Select Print Files to Delete" --file-selection --multiple --file-filter=[A-Za-z0-9]*

Joe

unSpawn 10-14-2010 03:06 PM

Thanks for posting the solution!

syg00 10-14-2010 08:33 PM

Of course that will also "hide" file with whitespace or special characters (I use underscore a lot).

Edit: well that's embarrassing - my underscore files got included regardless. But I show no "dot" files - ever. Filter or not.
So something is amiss somewhere.

josephj 10-15-2010 01:53 PM

syg00: Good point. I'll modify it.

unSpawn: I ask a lot more questions than those I solve, so I always try to give back when I can.

Joe


All times are GMT -5. The time now is 02:44 AM.