Fossil Wrapper

Check-in [2ee12c9c08]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:fixed erroneous comment block. added some comments to the config file definition as well.
Timelines: family | ancestors | descendants | both | dresden
Files: files | file ages | folders
SHA1: 2ee12c9c08df6bbcd074c12d12fa9b32931b3b80
User & Date: j 2013-07-24 14:16:42
Context
2013-07-24
14:27
redefinition of some aliases. check-in: 7b6a25c3b1 user: j tags: dresden
14:16
fixed erroneous comment block. added some comments to the config file definition as well. check-in: 2ee12c9c08 user: j tags: dresden
13:58
`fsl' now regenerates the config file (~/.fslrc) if it is _older_ than the file containing the exectuable of `fsl'. check-in: 29016465ca user: j tags: dresden
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to fsl.

9
10
11
12
13
14
15
16
17
18
19
20


21
22
23
24
25
26
27
..
54
55
56
57
58
59
60
61




62
63
64
65
66
67
68
    set aliases {}
    set filters {};             # registered filters
    set commands {};            # registered interceptors

    proc init {filename} {
        set myname $::argv0
        if {[file exists $filename] && [file mtime $filename] > [file mtime $myname]} {
            #an existing config file is used only if it is _older_ than the running `fsl' file.
            #otherwise the config file is (re)created since it's definition might have changed.
            #note that this ensures changes to this script to become automatically
            #active for other users with their individual incarnations of `$filename' while
            #manual adjustments to `$filename' are no longer wise...


            set conf [read [open $filename]]
        } else {
            set conf [unindent_script $config::defaults]
            puts "(Creating $filename)"
            puts [open $filename w] $conf
        }
        uplevel #0 [list namespace eval config::fslrc $conf]
................................................................................
#     alias ? help
#
#     filter indent help {
#         return "\t$line"
#     }

set config::defaults {
    # -*-tcl-*-





    # -- Aliases:

    alias  .      changes
    alias  ,      ui
    alias  alog   {timeline -n 100000}
    alias  d      diff







|
|
|
|
|
>
>







 







|
>
>
>
>







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
..
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
    set aliases {}
    set filters {};             # registered filters
    set commands {};            # registered interceptors

    proc init {filename} {
        set myname $::argv0
        if {[file exists $filename] && [file mtime $filename] > [file mtime $myname]} {
	    # an existing config file is used only if it is _newer_ than the
	    # running `fsl' file. otherwise the config file is (re)created
	    # since it's definition in `config::defaults' might have changed.
	    # this makes it probable that changes to this script become
	    # automatically active for other users (as long as they don't happen
	    # to manually modify there config files frequently ...)

            set conf [read [open $filename]]
        } else {
            set conf [unindent_script $config::defaults]
            puts "(Creating $filename)"
            puts [open $filename w] $conf
        }
        uplevel #0 [list namespace eval config::fslrc $conf]
................................................................................
#     alias ? help
#
#     filter indent help {
#         return "\t$line"
#     }

set config::defaults {
    # configuration file for the `Fossil SCM' wrapper script `fsl'.
    # this file might be modified but changes are not guaranteed
    # to be permanent: the file is regenerated if it is older
    # than the script file for `fsl' (which will happen
    # each time the script file itself is edited).

    # -- Aliases:

    alias  .      changes
    alias  ,      ui
    alias  alog   {timeline -n 100000}
    alias  d      diff