Skip to content

Instantly share code, notes, and snippets.

@robert-saramet
Last active March 21, 2023 17:13
Show Gist options
  • Select an option

  • Save robert-saramet/a5c6cc5d1d74529cb738b0b27de9349c to your computer and use it in GitHub Desktop.

Select an option

Save robert-saramet/a5c6cc5d1d74529cb738b0b27de9349c to your computer and use it in GitHub Desktop.
Fish command to print all files in directory using bat. Unorthodox code.
function batdir --description 'Print all files in directory using bat'
if not count $argv > /dev/null
set path .
else
set path (string trim -r -c / $argv)
end
for file in $path/*
bat -P $file 2> /dev/null
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment