mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-12 10:22:12 +02:00
Init: add --disable-stdout-buffer option
This commit is contained in:
@@ -35,7 +35,7 @@ jobs:
|
||||
uses: github/codeql-action/analyze@v2
|
||||
|
||||
- name: run fastfetch
|
||||
run: ./fastfetch --recache --disable-linewrap false --hide-cursor false --show-errors true --load-config presets/all
|
||||
run: ./fastfetch --recache --disable-linewrap false --hide-cursor false --show-errors true --load-config presets/all --disable-stdout-buffer
|
||||
|
||||
- name: run flashfetch
|
||||
run: ./flashfetch
|
||||
@@ -81,7 +81,7 @@ jobs:
|
||||
uses: github/codeql-action/analyze@v2
|
||||
|
||||
- name: run fastfetch
|
||||
run: ./fastfetch --recache --disable-linewrap false --hide-cursor false --show-errors true --load-config presets/all
|
||||
run: ./fastfetch --recache --disable-linewrap false --hide-cursor false --show-errors true --load-config presets/all --disable-stdout-buffer
|
||||
|
||||
- name: run flashfetch
|
||||
run: ./flashfetch
|
||||
@@ -113,7 +113,7 @@ jobs:
|
||||
run: |
|
||||
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On .
|
||||
cmake --build . --target package
|
||||
./fastfetch --recache --disable-linewrap false --hide-cursor false --show-errors true --load-config presets/all
|
||||
./fastfetch --recache --disable-linewrap false --hide-cursor false --show-errors true --load-config presets/all --disable-stdout-buffer
|
||||
./flashfetch
|
||||
ctest
|
||||
|
||||
@@ -180,7 +180,7 @@ jobs:
|
||||
run: cp /clang64/bin/{libcjson,libOpenCL,vulkan-1}.dll .
|
||||
|
||||
- name: run fastfetch
|
||||
run: ./fastfetch --recache --disable-linewrap false --hide-cursor false --show-errors true --load-config presets/all
|
||||
run: ./fastfetch --recache --disable-linewrap false --hide-cursor false --show-errors true --load-config presets/all --disable-stdout-buffer
|
||||
|
||||
- name: run flashfetch
|
||||
run: ./flashfetch
|
||||
|
||||
@@ -175,6 +175,7 @@ __fastfetch_completion()
|
||||
"--logo-print-remaining"
|
||||
"--multithreading"
|
||||
"--allow-slow-operations"
|
||||
"--disable-stdout-buffer"
|
||||
"--disable-linewrap"
|
||||
"--hide-cursor"
|
||||
"--cpu-temp"
|
||||
|
||||
@@ -33,6 +33,12 @@
|
||||
# Default is true.
|
||||
#--multithreading true
|
||||
|
||||
# Disable stdout buffer option:
|
||||
# Sets if fastfetch should disable application buffer of stdout. Mainly for debugging purpose.
|
||||
# Must be true or false.
|
||||
# Default is false.
|
||||
#--disable-stdout-buffer false
|
||||
|
||||
# Slow operations option:
|
||||
# Sets if fastfetch is allowed to use known slow operations to detect more / better values.
|
||||
# Must be true or false.
|
||||
|
||||
@@ -19,6 +19,7 @@ General options:
|
||||
--load-config <file>: load a config file or a preset (+)
|
||||
--multithreading <?value>: use multiple threads to detect values
|
||||
--allow-slow-operations <?value>: allow operations that are usually very slow for more detailed output
|
||||
--disable-stdout-buffer <?value>: disable stdout application buffer
|
||||
--escape-bedrock <?value>: on bedrock linux, sets if it should escape the bedrock jail or not
|
||||
--pipe <?value>: disable logo and all escape sequences
|
||||
|
||||
|
||||
@@ -909,6 +909,11 @@ static void parseOption(FFinstance* instance, FFdata* data, const char* key, con
|
||||
instance->config.multithreading = optionParseBoolean(value);
|
||||
else if(strcasecmp(key, "--allow-slow-operations") == 0)
|
||||
instance->config.allowSlowOperations = optionParseBoolean(value);
|
||||
else if(strcasecmp(key, "--disable-stdout-buffer") == 0)
|
||||
{
|
||||
if(optionParseBoolean(value))
|
||||
setvbuf(stdout, NULL, _IONBF, 0);
|
||||
}
|
||||
else if(strcasecmp(key, "--escape-bedrock") == 0)
|
||||
instance->config.escapeBedrock = optionParseBoolean(value);
|
||||
else if(strcasecmp(key, "--pipe") == 0)
|
||||
|
||||
Reference in New Issue
Block a user