5690
|
1 fnamemodify('.', ':p' )[-1:] '/'
|
|
2 fnamemodify('.', ':p:h' )[-1:] 'r'
|
|
3 fnamemodify('test.out', ':p' )[-1:] 't'
|
|
4 fnamemodify('test.out', ':.' ) 'test.out'
|
|
5 fnamemodify('../testdir/a', ':.' ) 'a'
|
5751
|
6 fnamemodify('test.out', ':~' ) '~/testdir/test.out'
|
|
7 fnamemodify('../testdir/a', ':~' ) '~/testdir/a'
|
5690
|
8 fnamemodify('../testdir/a', ':t' ) 'a'
|
|
9 fnamemodify('.', ':p:t' ) ''
|
|
10 fnamemodify('test.out', ':p:t' ) 'test.out'
|
|
11 fnamemodify('test.out', ':p:e' ) 'out'
|
|
12 fnamemodify('test.out', ':p:t:e' ) 'out'
|
|
13 fnamemodify('abc.fb2.tar.gz', ':r' ) 'abc.fb2.tar'
|
|
14 fnamemodify('abc.fb2.tar.gz', ':r:r' ) 'abc.fb2'
|
|
15 fnamemodify('abc.fb2.tar.gz', ':r:r:r' ) 'abc'
|
5751
|
16 substitute(fnamemodify('abc.fb2.tar.gz', ':p:r:r'), '.*\(testdir/.*\)', '\1', '') 'testdir/abc.fb2'
|
5690
|
17 fnamemodify('abc.fb2.tar.gz', ':e' ) 'gz'
|
|
18 fnamemodify('abc.fb2.tar.gz', ':e:e' ) 'tar.gz'
|
|
19 fnamemodify('abc.fb2.tar.gz', ':e:e:e' ) 'fb2.tar.gz'
|
|
20 fnamemodify('abc.fb2.tar.gz', ':e:e:e:e') 'fb2.tar.gz'
|
|
21 fnamemodify('abc.fb2.tar.gz', ':e:e:r' ) 'tar'
|
|
22 fnamemodify('abc def', ':S' ) '''abc def'''
|
|
23 fnamemodify('abc" "def', ':S' ) '''abc" "def'''
|
|
24 fnamemodify('abc"%"def', ':S' ) '''abc"%"def'''
|
|
25 fnamemodify('abc'' ''def', ':S' ) '''abc''\'''' ''\''''def'''
|
|
26 fnamemodify('abc''%''def', ':S' ) '''abc''\''''%''\''''def'''
|
|
27 fnamemodify("abc\ndef", ':S' ) '''abc^@def'''
|
|
28 fnamemodify("abc\ndef", ':S' ) '''abc\^@def'''
|
|
29 vim: ts=8
|