浏览代码

Do not sort keys when reading

For purpose of rewriting user's INI, we don't want to mess it up more
than is necessary.
Alois Mahdal 7 年前
父节点
当前提交
1d59219fc3
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      src/include/ini.sh

+ 1
- 1
src/include/ini.sh 查看文件

90
     # List keys from a section
90
     # List keys from a section
91
     #
91
     #
92
     local sct=$1    # section of interest
92
     local sct=$1    # section of interest
93
-    _ini_grepsec "$sct" | cut -d= -f1 | sort | uniq
93
+    _ini_grepsec "$sct" | cut -d= -f1 | awk '!x[$0]++'
94
 }
94
 }
95
 
95
 
96
 _ini_maybe_expand() {
96
 _ini_maybe_expand() {