skim icon indicating copy to clipboard operation
skim copied to clipboard

shortening long filenames

Open bionicles opened this issue 3 years ago • 1 comments

I have some long filenames from synthetic data which put uuid in the filename (dumb but not my fault!)

ex Zula72_Ondricka197_907bd608-e768-4ce4-a5d8-4c7ba87bffa5.json

it takes up so much space it's hard to see the preview, is there a way to shorten the filenames in skim without renaming the files?

bionicles avatar Mar 17 '21 16:03 bionicles

@bionicles Skim knows nothing about the meaning of the content and there is no optimization for filename displays.

There are two possible solutions:

  1. Skim provides ways to scroll left/right, bind to Alt-h, Alt-l by default. So you are not sticked to the default view.
  2. With -d and --with-nth you could format what's shown on the screen. e.g.
    $ echo Zula72_Ondricka197_907bd608-e768-4ce4-a5d8-4c7ba87bffa5.json | sk -d '_' --with-nth ..-2
    > Zula72_Ondricka197_
    
    However this feature is designed to format structured texts(e.g. csv) and might not meet your need directly.

lotabout avatar Mar 19 '21 02:03 lotabout