tag:blogger.com,1999:blog-62738186848314543062024-03-18T11:48:25.542+02:00cat **/*Akshaalhttp://www.blogger.com/profile/05677582369584740657noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-6273818684831454306.post-40638225815693073302009-10-02T14:59:00.003+03:002009-10-02T15:04:06.204+03:00More security with ZSHDon't save commands in history while a secure device is mounted. The mounted device must have .secure file in order to disable history file while the device mounted.<br /><br /><pre>zshaddhistory() {<br /> DIRS=`cat /proc/mounts | rgrep -P '(fuse|ext3|ext2|ext4|fat)' | cut -f2 -d' '`<br /> FLAG=`for dir in ${=DIRS} ; do test -f "$dir/.secure" && echo secure; done`<br /> echo $FLAG | grep secure 2>/dev/null >/dev/null && return -1 || return 0<br />}</pre><ad></ad>Akshaalhttp://www.blogger.com/profile/05677582369584740657noreply@blogger.com0