Sfoglia il codice sorgente

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 anni fa
parent
commit
1d59219fc3
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1
    1
      src/include/ini.sh

+ 1
- 1
src/include/ini.sh Vedi File

@@ -90,7 +90,7 @@ _ini_lskeys() {
90 90
     # List keys from a section
91 91
     #
92 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 96
 _ini_maybe_expand() {