glow icon indicating copy to clipboard operation
glow copied to clipboard

config file not respected

Open minhtrancccp opened this issue 1 year ago • 0 comments

Describe the bug i have my configs saved in the default location of ~/.config/glow/glow.yml, but all of my directives are ignored by glow, in contrast to when it is specify via command arguments (for example, -w/--width instead of width: [...])

Setup

  • version: 2.1.0
  • system: "x86_64-linux"
  • host os: Linux 6.14.2, NixOS, 25.05 (Warbler), 25.05.20250417.b024ced

Additional context

`glow help`
  Render markdown on the CLI, with pizzazz!

Usage:
  glow [SOURCE|DIR] [flags]
  glow [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  config      Edit the glow config file
  help        Help about any command

Flags:
  -a, --all                  show system files and directories (TUI-mode only)
      --config string        config file (default /home/usercccp/.config/glow/glow.yml)
  -h, --help                 help for glow
  -l, --line-numbers         show line numbers (TUI-mode only)
  -p, --pager                display with pager
  -n, --preserve-new-lines   preserve newlines in the output
  -s, --style string         style name or JSON path (default "auto")
  -t, --tui                  display with tui
  -v, --version              version for glow
  -w, --width uint           word-wrap at width (set to 0 to disable)

Use "glow [command] --help" for more information about a command.
`~/.config/glow/glow.yml`
line-numbers: true
mouse: true
pager: true
width: 0

below is an example of how glow behaves without and with passed arguments

`glow TODO.md` or `glow --config ~/.config/glow/glow.yml TODO.md`

  # todo list                                                                     
                                                                                  
  see here                                                                        
  https://github.com/todomd/todo.                                                 
  md/blob/0bc8c741496b266e8a3dc7dc1706ab56e3258ecf/TODO.md                        
  for how to structure this file                                                  
                                                                                  
  ## in progress                                                                  
                                                                                  
  [ ] nixcord                                                                     
  [ ] shell                                                                       
      [ ] check for new nixos-unstable commit                                     
      [ ] helper functions for nixos-rebuild                                      
      [ ] update commit hash in github blob comments                              
      • [[ "$(nix flake metadata nixpkgs/nixos-unstable --json | jq --raw-        
      output .revision)" = "$(nixos-version --hash)" ]]                           
      • type -p grep | readlink -f "$(</dev/stdin)"                               
      • https://discourse.nixos.org/t/packaging-a-bash-script-issues/20224        
      https://discourse.nixos.org/t/packaging-a-bash-script-issues/20224          
      • https://ertt.ca/nix/shell-scripts/ https://ertt.ca/nix/shell-scripts/     
      • https://nixos.org/manual/nixpkgs/unstable/#sec-functions-library-cli      
      https://nixos.org/manual/nixpkgs/unstable/#sec-functions-library-cli        
      • https://nixos.org/manual/nixpkgs/unstable/#trivial-builder-               
      writeShellApplication https://nixos.org/manual/nixpkgs/unstable/#trivial-   
      builder-writeShellApplication                                               
      • https://wiki.nixos.org/wiki/Nix_Cookbook#Creating_shell_scripts           
      https://wiki.nixos.org/wiki/Nix_Cookbook#Creating_shell_scripts             
      • https://www.youtube.com/watch?v=diIh0P12arA https://www.youtube.          
      com/watch?v=diIh0P12arA                                                     
      • https://www.youtube.com/watch?v=qRE6kf30u4g https://www.youtube.          
      com/watch?v=qRE6kf30u4g                                                     
  [ ] ibus-bamboo                                                                 
      • https://forum.manjaro.org/t/plasma-6-wayland-and-ibus/162937              
      https://forum.manjaro.org/t/plasma-6-wayland-and-ibus/162937                
      • https://github.com/BambooEngine/ibus-bamboo/pull/519#issuecomment-        
      2581607399 https://github.com/BambooEngine/ibus-                            
      bamboo/pull/519#issuecomment-2581607399                                     
  [ ] laptop                                                                      
      • https://wiki.archlinux.org/title/Laptop https://wiki.archlinux.           
      org/title/Laptop                                                            
      • https://wiki.nixos.org/wiki/Laptop https://wiki.nixos.org/wiki/Laptop     
  [ ] kwallet                                                                     
      [ ] pam autologin                                                           
      • https://timothymiller.dev/posts/2024/auto-login-with-nixos-and-kde-       
      plasma/ https://timothymiller.dev/posts/2024/auto-login-with-nixos-and-     
      kde-plasma/                                                                 
                                                                                  
                                                                                  
  ## todo                                                                         
                                                                                  
  [ ] ble.sh                                                                      
  [ ] kde                                                                         
      [ ] save display scaling in Display Configuration settings                  
      [ ] logout                                                                  
      [ ] konsole                                                                 
  [ ] autoUpgrade                                                                 
      • https://nixos.org/manual/nixos/unstable/#sec-upgrading-automatic          
      https://nixos.org/manual/nixos/unstable/#sec-upgrading-automatic            
  [ ] writer                                                                      
      [ ] toYAML                                                                  
      • https://nixos.org/manual/nixpkgs/unstable/#part-stdenv https://nixos.     
      org/manual/nixpkgs/unstable/#part-stdenv                                    
      • https://nixos.org/manual/nixpkgs/unstable/#trivial-builder-               
      runCommandWith-Inputs https://nixos.org/manual/nixpkgs/unstable/#trivial-   
      builder-runCommandWith-Inputs                                               
  [ ] lazygit                                                                     
      [ ] default commit message                                                  
      [ ] commit message body for conventional commits                            
  [ ] fzf                                                                         
      [ ] auto-completion for appropriate functions in ./auxiliary/init.bash      
      • complete -p [based command]                                               
  [ ] REORG                                                                       
      • https://github.com/nix-community/nix-on-                                  
      droid/tree/master/templates/advanced https://github.com/nix-                
      community/nix-on-droid/tree/master/templates/advanced                       
      • https://www.youtube.com/watch?v=vYc6IzKvAJQ https://www.youtube.          
      com/watch?v=vYc6IzKvAJQ                                                     
  [ ] atuin                                                                       
      [ ] daemon                                                                  
      • https://github.com/atuinsh/atuin/pull/2684 https://github.                
      com/atuinsh/atuin/pull/2684                                                 
  [ ] firefox                                                                     
      [ ] redirect explainxkcd                                                    
  [ ] steam                                                                       
      [ ] remote play                                                             
      • https://github.                                                           
                                                                                  
  com/NixOS/nixpkgs/blob/b6eaf97c6960d97350c584de1b6dcff03c9daf42/nixos/modules/programs/steam.
      nix#L211-L229 https://github.                                               
                                                                                  
  com/NixOS/nixpkgs/blob/b6eaf97c6960d97350c584de1b6dcff03c9daf42/nixos/modules/programs/steam.
      nix#L211-L229                                                               
  [ ] treefmt                                                                     
      [ ] ci                                                                      
  [ ] git                                                                         
      [ ] delta alternatives                                                      
      [ ] maintenance                                                             
      • https://git-scm.com/docs/git-maintenance https://git-scm.com/docs/git-    
      maintenance                                                                 
      • https://noborus.github.io/ov/delta/index.html https://noborus.github.     
      io/ov/delta/index.html                                                      
  [ ] nixpkgs                                                                     
      [ ] detect package with flakes supported                                    
      • nix derivation show -r /run/current-system | jq '[.[].env|select(.        
      pname and.src and(.src|test("source$")))|"\(.pname) \(.src)"]|unique' |     
      bat -nljson                                                                 
  [ ] nix                                                                         
      [ ] replicate usage of access tokens with gh and glab api calls to          
      forgejo and sourcehut instances                                             
      [ ] list substituters of inputs in flake.lock                               
      • https://forgejo.org/docs/latest/user/api-usage/#oauth2-provider           
      https://forgejo.org/docs/latest/user/api-usage/#oauth2-provider             
      • https://github.com/search?q=repo%3ANixOS%2Fnix+access+                    
      token&type=issues https://github.com/search?q=repo%3ANixOS%2Fnix+access+    
      token&type=issues                                                           
      • https://nix.dev/manual/nix/latest/command-ref/new-cli/nix3-flake#types    
      https://nix.dev/manual/nix/latest/command-ref/new-cli/nix3-flake#types      
  [ ] lix                                                                         
      • https://git.lix.systems/lix-project/nixos-module https://git.lix.         
      systems/lix-project/nixos-module                                            
      • https://lix.systems/resources/ https://lix.systems/resources/             
      • https://old.reddit.                                                       
      com/r/NixOS/search/?q=lix&include_over_18=on&restrict_sr=on&sort=new        
      https://old.reddit.                                                         
      com/r/NixOS/search/?q=lix&include_over_18=on&restrict_sr=on&sort=new        
      • https://wiki.lix.systems/books/lix-contributors/page/codebase-overview    
      https://wiki.lix.systems/books/lix-contributors/page/codebase-overview      
      • https://wiki.lix.systems/books/lix-contributors/page/lix-beta-            
      guide#bkmrk-flakes https://wiki.lix.systems/books/lix-                      
      contributors/page/lix-beta-guide#bkmrk-flakes                               
  [ ] ./temp/old-nixes                                                            
  [ ] disko                                                                       
      [ ] lvm                                                                     
      [ ] disk encryption with unattended boot using tpm                          
      • https://github.com/nix-community/disko/issues/295 https://github.         
      com/nix-community/disko/issues/295                                          
                                                                                  
                                                                                  
  ## done ✓                                                                       
                                                                                  
  [ ] bash                                                                        
      [x] add gh notify in init                                                   
      [x] add HISTTIMEFORMAT                                                      
  [ ] git                                                                         
      [x] add merge.autoStash, push.autoSetupRemote                               
  [ ] lazygit                                                                     
      [x] add git.overrideGpg                                                     
      [x] update syntax of custom commands                                        
  [ ] nix                                                                         
      [x] adapt recommendedDefaults options from nuschtos/nixos-modules           
      [x] add substituters                                                        
      [x] replace NIX_USER_CONF_FILES with extraOptions                           
  [ ] nixpkgs                                                                     
      [x] add unfree exemptions for stremio                                       
      [x] update allowUnfreePredicate                                             
  [ ] kde                                                                         
      [x] night light                                                             
      [x] kwinrc.Xwayland.Scale                                                   
  [x] REFACTORING                                                                 
      [x] add editor and pager env var in userspace                               
      [x] add mergeAttrs as a partial substitue of lib.modules.mkMerge for non-   
      modules attrs                                                               
      [x] add toYAML for generating config files                                  
      [x] add nativeMessagingHosts                                                
      [x] add flakeDefault, temporarily                                           
      • flakeDefault = path: lib.attrsets.attrByPath (path ++ [ "default" ])      
      null                                                                        
      • ([ "nixosModules" ] |> flakeDefault |> lib.map)                           
      [x] prepare firefox-addons-nix                                              
      [x] reduce attrNames, genAttrs, let                                         
      [x] replace with by inherit                                                 
      [x] standardise pipes and attrs merges                                      
      [x] update username and multiline comment style                             
  [x] batman                                                                      
      [x] add env vars                                                            
  [x] dotfiles                                                                    
      [x] add configs for ov                                                      
      [x] remove obsolete dir                                                     
  [x] kanata                                                                      
      [x] add home row mods                                                       
  [x] kernel                                                                      
      [x] use latest version                                                      
  [x] mime                                                                        
      [x] remove addedAssociations and vlc defaults                               
      [x] update structure of defaultApplications                                 
  [x] nix-index                                                                   
      [x] replace with nix-index-database                                         
  [x] nur                                                                         
      [x] remove from usage                                                       
  [x] nix-tree                                                                    
      [x] replace defaultPackage                                                  
  [x] sops                                                                        
      [x] support atuin credentials                                               
                                                                                  
                                                                                  
  ## resources                                                                    
                                                                                  
  • https://en.wikipedia.org/wiki/ASCII#Character_set https://en.wikipedia.       
  org/wiki/ASCII#Character_set                                                    
  • https://home-manager-options.extranix.com/?query=&release=master https://home-
  manager-options.extranix.com/?query=&release=master                             
  • https://home-manager.dev/ https://home-manager.dev/                           
  • https://nix.dev/manual/nix/latest/ https://nix.dev/manual/nix/latest/         
  • https://nixos.org/learn/ https://nixos.org/learn/                             
  • https://nixos.org/manual/nixos/unstable/ https://nixos.                       
  org/manual/nixos/unstable/                                                      
  • https://nixos.org/manual/nixpkgs/unstable/ https://nixos.                     
  org/manual/nixpkgs/unstable/                                                    
  • https://noogle.dev/ https://noogle.dev/                                       
  • https://nuschtos-search.pages.dev/ https://nuschtos-search.pages.dev/         
  • https://search.nixos.org/packages?channel=unstable https://search.nixos.      
  org/packages?channel=unstable                                                   
  • https://wiki.nixos.org/wiki/NixOS_Wiki https://wiki.nixos.org/wiki/NixOS_Wiki 

`glow --width 0 TODO.md` or `glow --config ~/.config/glow/glow.yml --width 0 TODO.md`

  # todo list
  
  see here https://github.com/todomd/todo.md/blob/0bc8c741496b266e8a3dc7dc1706ab56e3258ecf/TODO.md for how to structure this file
  
  ## in progress
  
  [ ] nixcord
  [ ] shell
      [ ] check for new nixos-unstable commit
      [ ] helper functions for nixos-rebuild
      [ ] update commit hash in github blob comments
      • [[ "$(nix flake metadata nixpkgs/nixos-unstable --json | jq --raw-output .revision)" = "$(nixos-version --hash)" ]]
      • type -p grep | readlink -f "$(</dev/stdin)"
      • https://discourse.nixos.org/t/packaging-a-bash-script-issues/20224 https://discourse.nixos.org/t/packaging-a-bash-script-issues/20224
      • https://ertt.ca/nix/shell-scripts/ https://ertt.ca/nix/shell-scripts/
      • https://nixos.org/manual/nixpkgs/unstable/#sec-functions-library-cli https://nixos.org/manual/nixpkgs/unstable/#sec-functions-library-cli
      • https://nixos.org/manual/nixpkgs/unstable/#trivial-builder-writeShellApplication https://nixos.org/manual/nixpkgs/unstable/#trivial-builder-writeShellApplication
      • https://wiki.nixos.org/wiki/Nix_Cookbook#Creating_shell_scripts https://wiki.nixos.org/wiki/Nix_Cookbook#Creating_shell_scripts
      • https://www.youtube.com/watch?v=diIh0P12arA https://www.youtube.com/watch?v=diIh0P12arA
      • https://www.youtube.com/watch?v=qRE6kf30u4g https://www.youtube.com/watch?v=qRE6kf30u4g
  [ ] ibus-bamboo
      • https://forum.manjaro.org/t/plasma-6-wayland-and-ibus/162937 https://forum.manjaro.org/t/plasma-6-wayland-and-ibus/162937
      • https://github.com/BambooEngine/ibus-bamboo/pull/519#issuecomment-2581607399 https://github.com/BambooEngine/ibus-bamboo/pull/519#issuecomment-2581607399
  [ ] laptop
      • https://wiki.archlinux.org/title/Laptop https://wiki.archlinux.org/title/Laptop
      • https://wiki.nixos.org/wiki/Laptop https://wiki.nixos.org/wiki/Laptop
  [ ] kwallet
      [ ] pam autologin
      • https://timothymiller.dev/posts/2024/auto-login-with-nixos-and-kde-plasma/ https://timothymiller.dev/posts/2024/auto-login-with-nixos-and-kde-plasma/
  
  
  ## todo
  
  [ ] ble.sh
  [ ] kde
      [ ] save display scaling in Display Configuration settings
      [ ] logout
      [ ] konsole
  [ ] autoUpgrade
      • https://nixos.org/manual/nixos/unstable/#sec-upgrading-automatic https://nixos.org/manual/nixos/unstable/#sec-upgrading-automatic
  [ ] writer
      [ ] toYAML
      • https://nixos.org/manual/nixpkgs/unstable/#part-stdenv https://nixos.org/manual/nixpkgs/unstable/#part-stdenv
      • https://nixos.org/manual/nixpkgs/unstable/#trivial-builder-runCommandWith-Inputs https://nixos.org/manual/nixpkgs/unstable/#trivial-builder-runCommandWith-Inputs
  [ ] lazygit
      [ ] default commit message
      [ ] commit message body for conventional commits
  [ ] fzf
      [ ] auto-completion for appropriate functions in ./auxiliary/init.bash
      • complete -p [based command]
  [ ] REORG
      • https://github.com/nix-community/nix-on-droid/tree/master/templates/advanced https://github.com/nix-community/nix-on-droid/tree/master/templates/advanced
      • https://www.youtube.com/watch?v=vYc6IzKvAJQ https://www.youtube.com/watch?v=vYc6IzKvAJQ
  [ ] atuin
      [ ] daemon
      • https://github.com/atuinsh/atuin/pull/2684 https://github.com/atuinsh/atuin/pull/2684
  [ ] firefox
      [ ] redirect explainxkcd
  [ ] steam
      [ ] remote play
      • https://github.com/NixOS/nixpkgs/blob/b6eaf97c6960d97350c584de1b6dcff03c9daf42/nixos/modules/programs/steam.nix#L211-L229 https://github.com/NixOS/nixpkgs/blob/b6eaf97c6960d97350c584de1b6dcff03c9daf42/nixos/modules/programs/steam.nix#L211-L229
  [ ] treefmt
      [ ] ci
  [ ] git
      [ ] delta alternatives
      [ ] maintenance
      • https://git-scm.com/docs/git-maintenance https://git-scm.com/docs/git-maintenance
      • https://noborus.github.io/ov/delta/index.html https://noborus.github.io/ov/delta/index.html
  [ ] nixpkgs
      [ ] detect package with flakes supported
      • nix derivation show -r /run/current-system | jq '[.[].env|select(.pname and.src and(.src|test("source$")))|"\(.pname) \(.src)"]|unique' | bat -nljson
  [ ] nix
      [ ] replicate usage of access tokens with gh and glab api calls to forgejo and sourcehut instances
      [ ] list substituters of inputs in flake.lock
      • https://forgejo.org/docs/latest/user/api-usage/#oauth2-provider https://forgejo.org/docs/latest/user/api-usage/#oauth2-provider
      • https://github.com/search?q=repo%3ANixOS%2Fnix+access+token&type=issues https://github.com/search?q=repo%3ANixOS%2Fnix+access+token&type=issues
      • https://nix.dev/manual/nix/latest/command-ref/new-cli/nix3-flake#types https://nix.dev/manual/nix/latest/command-ref/new-cli/nix3-flake#types
  [ ] lix
      • https://git.lix.systems/lix-project/nixos-module https://git.lix.systems/lix-project/nixos-module
      • https://lix.systems/resources/ https://lix.systems/resources/
      • https://old.reddit.com/r/NixOS/search/?q=lix&include_over_18=on&restrict_sr=on&sort=new https://old.reddit.com/r/NixOS/search/?q=lix&include_over_18=on&restrict_sr=on&sort=new
      • https://wiki.lix.systems/books/lix-contributors/page/codebase-overview https://wiki.lix.systems/books/lix-contributors/page/codebase-overview
      • https://wiki.lix.systems/books/lix-contributors/page/lix-beta-guide#bkmrk-flakes https://wiki.lix.systems/books/lix-contributors/page/lix-beta-guide#bkmrk-flakes
  [ ] ./temp/old-nixes
  [ ] disko
      [ ] lvm
      [ ] disk encryption with unattended boot using tpm
      • https://github.com/nix-community/disko/issues/295 https://github.com/nix-community/disko/issues/295
  
  
  ## done ✓
  
  [ ] bash
      [x] add gh notify in init
      [x] add HISTTIMEFORMAT
  [ ] git
      [x] add merge.autoStash, push.autoSetupRemote
  [ ] lazygit
      [x] add git.overrideGpg
      [x] update syntax of custom commands
  [ ] nix
      [x] adapt recommendedDefaults options from nuschtos/nixos-modules
      [x] add substituters
      [x] replace NIX_USER_CONF_FILES with extraOptions
  [ ] nixpkgs
      [x] add unfree exemptions for stremio
      [x] update allowUnfreePredicate
  [ ] kde
      [x] night light
      [x] kwinrc.Xwayland.Scale
  [x] REFACTORING
      [x] add editor and pager env var in userspace
      [x] add mergeAttrs as a partial substitue of lib.modules.mkMerge for non-modules attrs
      [x] add toYAML for generating config files
      [x] add nativeMessagingHosts
      [x] add flakeDefault, temporarily
      • flakeDefault = path: lib.attrsets.attrByPath (path ++ [ "default" ]) null
      • ([ "nixosModules" ] |> flakeDefault |> lib.map)
      [x] prepare firefox-addons-nix
      [x] reduce attrNames, genAttrs, let
      [x] replace with by inherit
      [x] standardise pipes and attrs merges
      [x] update username and multiline comment style
  [x] batman
      [x] add env vars
  [x] dotfiles
      [x] add configs for ov
      [x] remove obsolete dir
  [x] kanata
      [x] add home row mods
  [x] kernel
      [x] use latest version
  [x] mime
      [x] remove addedAssociations and vlc defaults
      [x] update structure of defaultApplications
  [x] nix-index
      [x] replace with nix-index-database
  [x] nur
      [x] remove from usage
  [x] nix-tree
      [x] replace defaultPackage
  [x] sops
      [x] support atuin credentials
  
  
  ## resources
  
  • https://en.wikipedia.org/wiki/ASCII#Character_set https://en.wikipedia.org/wiki/ASCII#Character_set
  • https://home-manager-options.extranix.com/?query=&release=master https://home-manager-options.extranix.com/?query=&release=master
  • https://home-manager.dev/ https://home-manager.dev/
  • https://nix.dev/manual/nix/latest/ https://nix.dev/manual/nix/latest/
  • https://nixos.org/learn/ https://nixos.org/learn/
  • https://nixos.org/manual/nixos/unstable/ https://nixos.org/manual/nixos/unstable/
  • https://nixos.org/manual/nixpkgs/unstable/ https://nixos.org/manual/nixpkgs/unstable/
  • https://noogle.dev/ https://noogle.dev/
  • https://nuschtos-search.pages.dev/ https://nuschtos-search.pages.dev/
  • https://search.nixos.org/packages?channel=unstable https://search.nixos.org/packages?channel=unstable
  • https://wiki.nixos.org/wiki/NixOS_Wiki https://wiki.nixos.org/wiki/NixOS_Wiki

minhtrancccp avatar Apr 20 '25 03:04 minhtrancccp