I need to read and modify a single file (pcmanfm.conf
) in the current directory.
I tried
$ augtool -At "Toml.lns incl $(pwd)/pcmanfm.conf" -I lenses/ print /files
/files
but it does not work. toml.aug
(on /usr/share/augeas/lenses/dist/toml.aug
) starts with
(*
Module: Toml
Parses TOML files
Author: Raphael Pinson <[email protected]>
...
so I believe I put the name of the lens correctly (Toml.lns
).
The same setup works well if I parse file of a different type, e.g.
$ augtool -At "Shellvars.lns incl /tmp/vars.sh" -I lenses/ print /files
/files
/files/tmp
/files/tmp/vars.sh
/files/tmp/vars.sh/TESTINT = "2"
/files/tmp/vars.sh/TESTSTR = "\"FF\""
I've posted the same question on https://github.com/hercules-team/augeas/issues/699 in case it is a bug in Augeas.
The file I try to parse has the following content:
[config]
bm_open_method=0
[volume]
mount_on_startup=1
mount_removable=1
autorun=1
[ui]
always_show_tabs=0
max_tab_chars=32
win_width=1916
win_height=1149
splitter_pos=150
media_in_new_tab=0
desktop_folder_new_win=0
change_tab_on_drop=1
close_on_unmount=1
focus_previous=0
side_pane_mode=places
view_mode=compact
show_hidden=0
sort=name;ascending;
toolbar=newtab;navigation;home;
show_statusbar=1
pathbar_mode_buttons=0
I want to add/replace one value in the [ui]
section.