Feature #14746
closed
Method for users to customize shell initialization behavior
Added by Steve Wheeler about 1 year ago.
Updated 12 months ago.
Category:
Operating System
Plus Target Version:
23.09.1
Description
The .tcshrc file is created at every boot from /etc/skel/dot.tcshrc so to make changes persistent that file must be edited. However that file is overwritten at firmware upgrade.
To allow custom changes the file should reference a local file that can be added and changed as required.
See: https://netgate.slack.com/archives/C4GUL8CKF/p1623182176481600
- Subject changed from Allow persistent changes to .tcshrc to Allow user shell init file content
- Assignee set to Jim Pingle
I thought we already had an open feature request for this but I don't see it.
Rather than trying to accommodate someone replacing the entire file, we should just source a local version at the end of the existing files so that the user can override or define their own behavior. Rather than only do .tcshrc it should probably also do .cshrc, .shrc, and .profile since those are overwritten the same way.
I just pushed a commit that implements "local" versions of .profile
, .shrc
, and .tcshrc
which are, respectively: .profile.local
, .shrc.local
, and .tcshrc.local
in the user's home directory.
For logins with a menu, they are sourced before the menu is displayed.
The exact behavior of each file varies by shell, login type, and so on.
- Subject changed from Allow user shell init file content to Method for users to customize shell initialization behavior
- Status changed from New to Feedback
- % Done changed from 0 to 100
- Plus Target Version changed from 24.01 to 24.03
- Status changed from Feedback to Resolved
Tested on
23.09-DEVELOPMENT (amd64)
built on Fri Sep 29 23:50:00 UTC 2023
FreeBSD 14.0-CURRENT
and it's functioning as expected. Marking resolved.
- Target version changed from 2.8.0 to 2.7.1
- Target version changed from 2.7.1 to 2.7.2
- Plus Target Version changed from 24.03 to 23.09.1
- Target version changed from 2.7.2 to 2.7.1
Also available in: Atom
PDF