Fossil SCM

patchcmd.md: added a description of how to enable, if needed, a custom PATH via the remote bashrc.

stephan 2021-06-30 21:24 trunk
Commit 9a931a16aca2a7150198c61dd3e00fe09e62e0affde2389b73cf51c7367d34fd
1 file changed +34
--- www/patchcmd.md
+++ www/patchcmd.md
@@ -43,10 +43,44 @@
4343
set to go. If you get "fossil not found", or if the version shown is too
4444
old, put a newer fossil executable on the default PATH. The default PATH
4545
can be shown using:
4646
4747
> `ssh -T remote 'echo $PATH'`
48
+
49
+### Custom PATH Caveat
50
+
51
+On Unix-like systems, the init script for the user's login shell
52
+(e.g. `~/.profile` or `~/.bash_profile`) may be configured to *not do
53
+anything* when running under a non-interactive shell. Thus a fossil
54
+binary installed to a custom directory might not be found. To allow
55
+the patch command to use a fossil binary installed in a directory
56
+which is normally added to the PATH via the interactive shell's init
57
+script, it may be useful to disable that check. For example,
58
+Ubuntu-derived systems sometimes start their default `.bashrc` with
59
+something like:
60
+
61
+```
62
+# If not running interactively, don't do anything:
63
+[ -z "$PS1" ] && return
64
+# Or:
65
+case $- in
66
+ *i*) ;;
67
+ *) return;;
68
+esac
69
+```
70
+
71
+Commenting out that check will allow the patch command to run, for
72
+example, `~/bin/fossil` if `~/bin` is added to the PATH via the init
73
+script. To disable that check *only* when the shell is *not* running
74
+over an SSH connection, something like the following should suffice:
75
+
76
+```
77
+if [ -z "$SSH_CONNECTION" ]; then
78
+ # ... the is-interactive check goes here ...
79
+fi
80
+```
81
+
4882
4983
## Implementation Details
5084
5185
The "fossil patch create" command records all of the local, uncommitted
5286
changes in an SQLite database file. If the argument to "fossil patch create"
5387
--- www/patchcmd.md
+++ www/patchcmd.md
@@ -43,10 +43,44 @@
43 set to go. If you get "fossil not found", or if the version shown is too
44 old, put a newer fossil executable on the default PATH. The default PATH
45 can be shown using:
46
47 > `ssh -T remote 'echo $PATH'`
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
49 ## Implementation Details
50
51 The "fossil patch create" command records all of the local, uncommitted
52 changes in an SQLite database file. If the argument to "fossil patch create"
53
--- www/patchcmd.md
+++ www/patchcmd.md
@@ -43,10 +43,44 @@
43 set to go. If you get "fossil not found", or if the version shown is too
44 old, put a newer fossil executable on the default PATH. The default PATH
45 can be shown using:
46
47 > `ssh -T remote 'echo $PATH'`
48
49 ### Custom PATH Caveat
50
51 On Unix-like systems, the init script for the user's login shell
52 (e.g. `~/.profile` or `~/.bash_profile`) may be configured to *not do
53 anything* when running under a non-interactive shell. Thus a fossil
54 binary installed to a custom directory might not be found. To allow
55 the patch command to use a fossil binary installed in a directory
56 which is normally added to the PATH via the interactive shell's init
57 script, it may be useful to disable that check. For example,
58 Ubuntu-derived systems sometimes start their default `.bashrc` with
59 something like:
60
61 ```
62 # If not running interactively, don't do anything:
63 [ -z "$PS1" ] && return
64 # Or:
65 case $- in
66 *i*) ;;
67 *) return;;
68 esac
69 ```
70
71 Commenting out that check will allow the patch command to run, for
72 example, `~/bin/fossil` if `~/bin` is added to the PATH via the init
73 script. To disable that check *only* when the shell is *not* running
74 over an SSH connection, something like the following should suffice:
75
76 ```
77 if [ -z "$SSH_CONNECTION" ]; then
78 # ... the is-interactive check goes here ...
79 fi
80 ```
81
82
83 ## Implementation Details
84
85 The "fossil patch create" command records all of the local, uncommitted
86 changes in an SQLite database file. If the argument to "fossil patch create"
87

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button