Completion in tcsh

Completion in tcsh

Here's a basic completion for tcsh. This can be added to your .cshrc (or .tcshrc) or .login file or ask your sys admin to add it globally.

    complete rv \
    'c/-/(cmap crop uncrop in out noMovieAudio pa ro fps ao so volume pclut reuse qtdesktop bg c l lookback cram lram s ns stereo comp over diff tile noSequence inferSequence rthreads fullscreen nofloat maxbits gamma sRGB rec709 floatLUT dlut llut flut brightness nomb play noaudio formats exrcpus exrInherit qtgrb lic noPrefs resetPrefs qtstyle network networkHost networkPort networkConnect nopackages encodeURL flags debug version)/' \
    'n/-debug/(audio mu shaders threads gpu cache)'/ \
    'n/-[dlf]lut/f:*/' \
    'n/-pclut/f:*/' \
    'n/-fps/(24 25 30 29.97 60 50)/' \
    'n/-maxbits/(8 16 32)/' \
    'n/-floatLUT/(1 0)/' \
    'n/-stereo/(hardware anaglyph left right pair mirror)/' \
    'n/-resampleMethod/(area linear cubic nearest)/' \
    'n/-comp/(over add difference replace)/' \
    'n/-cram/(.5 1 2 3 4 6 10)/' \
    'n/-lram/(.15 .25 .5 1)/' \
    'n/-s/(.5 .25 .125)/' \
    'n/-lookback/(2 10 30 50)/' \
    'n/-bg/(black solid solid50 checked chrosshatch)/' \
    'n/-exrcpus/(1 2 3 4 5 6 7)/' \
    'n/-qtdesktop/(1 0)/' \
    'n/-reuse/(1 0)/'

If you're always using rv to view sequences of images from the current directory you can add this line to the above:

    'n,*,`rvls .`,' 

Make sure you put a backslash as the last char of the line above it. This will cause rvls to be used for completion in the current directory. The downside is that searching for directories as absolute paths will no longer complete. If the above works for you, you can add additional subdirs to the completion as well:

    'n,*,`rvls . * */*`,' 

For example, the above adds the any subdirs and sub-subdirs to the current directory for completion using rvls. In a big file hierarchy this can be very slow so I don't recommend this unless you know what you're doing.



Please sign in to leave a comment.