Skip to content

Commit 98d46cc

Browse files
committed
Use blockinfile() for easier ordering management
1 parent 4302778 commit 98d46cc

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

shell/HOMELY.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,16 @@ def _bashrc():
184184

185185
@section(enabled=want_full)
186186
def zsh_config():
187-
lineinfile('~/.zshrc', 'source $HOME/.shellrc', where=WHERE_TOP)
188-
lineinfile('~/.zshrc', 'source $HOME/.config/shell_settings.sh', where=WHERE_TOP)
187+
blockinfile(
188+
'~/.zshrc',
189+
[
190+
'source $HOME/.config/shell_settings.sh',
191+
'source $HOME/.shellrc',
192+
],
193+
where=WHERE_TOP,
194+
prefix='Start of homely initialisation',
195+
suffix='End of homely initialisation',
196+
)
189197
install_completions('~/.zshrc')
190198
lineinfile('~/.zshrc', 'shell_init_done # this line must be last', where=WHERE_END)
191199
antigen = InstallFromSource('https://github.com/zsh-users/antigen.git',

0 commit comments

Comments
 (0)