Resource file
This is the default ~/.fslrc (as of [6691974852]), created on first run of fsl:
<verbatim> # -*-tcl-*-
# -- Aliases:
alias . changes alias d diff alias , ui alias log timeline alias heads leaves; # for hg refugees
# -- Filters:
filter status {changes status timeline add rm addremove} { lassign split [string trim $line] status switch $status { MERGED_WITH { coloured purple $line } ADDED { coloured green $line } EDITED { coloured cyan $line } DELETED { coloured red $line } default { set line } } }
filter log_entry {leaves timeline} { if {regexp "^=== .* ===" $line} { coloured blue $line } else { regsub -all {\[A-Fa-f0-9+\]} $line coloured yellow & } }
# Filter on alias `d' instead of `diff' so that output can be # redirected to create patch files. filter diff {d} { switch -regexp $line { {^-} { coloured red $line } {^\+} { coloured green $line } {^@@} { coloured yellow $line } default { set line } } }
filter highlight_branch {branch} { expr {regexp {^\* } $line ? coloured yellow $line : $line} } </verbatim>
It defines a handful of simple aliases and filters; these are simply a starting point and by no means comprehensive.
Aliases
The five default aliases offer simple command-name expansions (no switches) for builtin Fossil commands.
Useful variations/additions include:
- alias log {timeline -t ci}. This alternative log alias displays the file commit timeline, yielding a view of the repository more consistent with Mercurial, Git and other SCMs.
- alias history {timeline -n 50}. Display a greater number of timeline checkins (adjust -n to suit).
Filters
All four filters colour Fossil output:
- status. Colours file status information for: changes, status, timeline, add, rm ad addremove.
- log_entry. Provides simple timeline colouring, highlighting artifact IDs and dates in leaves and timeline. Since log expands to timeline by default, this highlighting also occurs in fsl log.
- diff. Colours the d (→ diff) alias.
- highlight_branch. Colours the current branch name yellow (fsl branch).