diff options
author | pgen <p.gen.progs@gmail.com> | 2023-01-22 14:09:30 +0100 |
---|---|---|
committer | pgen <p.gen.progs@gmail.com> | 2023-01-22 16:32:36 +0100 |
commit | 8c8a3951978d7d97028635bc36e237202e33ef19 (patch) | |
tree | e2404cf6960a6b46c4644302e6ddaeab34d78fe9 /FAQ | |
parent | 3c2d08dbf6c74322537825e579a5b8d6c9c2fc19 (diff) |
Add an entry in the FAQ about alignments
Diffstat (limited to 'FAQ')
-rw-r--r-- | FAQ | 35 |
1 files changed, 34 insertions, 1 deletions
@@ -32,6 +32,39 @@ A: smenu uses a new system of options based on the notion of contexts. The The string '[-c|-col|-col_mode|-column>Columns]' that is printed in the error message indicates that to switch to "Columns" mode must use the -c parameter or its alternatives. - + In this case the correct command line should contain something like: smenu -c -C... +-------- +Q: How to preserve the original alignment of the columns? + +A: smenu merges multiple occurrences of word delimiters (' ' in the + example below) and so the original alignment of columns is lost. + One way to limit this loss is to replace the delimiter with a character + that does not appear in the input and is not a delimiter, we will use + '!' in the example, and tell smenu to replace it with a space with the + -S option. + + Example of a session using the free command: + + $ free + total used free shared buff/cache available + Mem: 23Gi 4,3Gi 1,6Gi 118Mi 18Gi 19Gi + Swap: 2,0Gi 0,0Ki 2,0Gi + + $ free -h | smenu -c + total used free shared buff/cache available + Mem: 23Gi 4,3Gi 1,6Gi 118Mi 18Gi 19Gi + Swap: 2,0Gi 0,0Ki 2,0Gi + + $ free -h | sed -e 's/ /!/g' -e 's/!\([^!]\)/ \1/g' + !!!!!!!!!!!!!! total!!!!!!! used!!!!!!! free!!!!! shared! buff/cache!! available + Mem:!!!!!!!!!!! 23Gi!!!!!! 4,3Gi!!!!!! 1,6Gi!!!!!! 120Mi!!!!!!! 18Gi!!!!!!! 19Gi + Swap:!!!!!!!!! 2,0Gi!!!!!! 0,0Ki!!!!!! 2,0Gi + + $ free -h | sed -e 's/ /!/g' -e 's/!\([^!]\)/ \1/g' | smenu -c -S'/!/ /g' + ############### total used free shared buff/cache available + Mem: 23Gi 4,3Gi 1,6Gi 118Mi 18Gi 19Gi + Swap: 2,0Gi 0,0Ki 2,0Gi + + Where ############### is the smenu cursor. |