Bash completion is a very good feature in Bash. We are able to complete filenames, just by pressing <TAB>. I had downloaded a YouTube video related to Tsar Bomba. Since YouTube videos are Flash Video files (.flv), I was not able to complete their filenames by pressing <TAB> in the terminal when trying to invoke mplayer.
A quick inspection of /etc/bash_completion solved the problem.
In mplayer(1) completion section,
_filedir '@(mp?(e)g|MP?(E)G|wm[av]|WM[AV]|avi
|AVI|asf|ASF|vob|VOB|bin|BIN|dat|DAT|vcd|VCD|ps
|PS|pes|PES|fli|FLI|viv|VIV|rm?(j)|RM?(J)|ra?(m)|RA?
(M)|yuv|YUV|mov|MOV|qt|QT|mp[34]|MP[34]|og[gm]|OG[GM]
|wav|WAV|dump|DUMP|mkv|MKV|m4a|M4A|aac|AAC|m2v|M2V|dv
|DV|rmvb|RMVB|mid|MID|ts|TS|3gp|mpc|MPC|flac|FLAC|flv)'
flv was appended at the end. That was it. Problem solved! Happy viewing!
Thursday, October 30, 2008
Bash Completion
Posted by Alan Haggai Alavi at 10:59 AM 0 comments Links to this post
Labels: bash, bash completion
Saturday, October 25, 2008
.Zip parser code
The local subversion repository of zip_parser has been migrated to Google Code using svnsync. Have to add support for Zip64 and encrypted archives soon.
Project Home: http://code.google.com/p/zipparser/
Posted by Alan Haggai Alavi at 9:00 AM 0 comments Links to this post
Labels: Fixing Bugs in the Archive Zip Perl Module, Parser, Perl, Zip
Sunday, October 19, 2008
.Zip Parser
The .Zip file parser has been completed. I will host the code soon, and probably convert it into a Perl module for analysing different types of .Zip files created by different software.
Posted by Alan Haggai Alavi at 3:42 PM 0 comments Links to this post
Labels: Fixing Bugs in the Archive Zip Perl Module, Perl, Zip

