Comments (2)
I feel your pain with copying files, but I'm not sure if this would be within the scope of bat
. The cat
command is used for printing the contents of one or more files, and bat
is follows suit as a syntax-highlighting printer for various file formats. Copying text directly from files feels like it would be better suited to a dedicated command, both for maintainability and compatability reasons.
If you don't mind using shell aliases, I might have something that works better for you:
alias pbcopy="xclip -selection clipboard -in"
alias pbpaste="xclip -selection clipboard -out"
MacOS uses pbcopy
and pbpaste
, which are simple commands that use standard input and standard output to copy/paste from the clipboard. The above aliases work similarly, and it makes copying as painless as:
pbcopy < some_file.txt
head -n20 some_file.txt | pbcopy
pbpaste | bat -l txt
from bat.
I know the issue is closed, but I'm dropping a comment to reference #296 since it's related.
from bat.
Related Issues (20)
- [bat --paging=never --plain] still paging, since version 0.24.0 HOT 1
- JSON-LD (`*.jsonld`, identical to `*.json`) HOT 1
- Better way to use alias bat instead of batcat symlink for ubuntu HOT 2
- bat closes interactive mode instantly when terminal resizes to fit file HOT 2
- Not possible to specify jsonl (JSON lines) in the language parameter HOT 2
- Cannot compile bat: error[E0282]: type annotations needed for `Box<_>`
- Add new syntax: CSS3 HOT 1
- why bat does not support edit function?
- why bat can not enter edit mode? HOT 8
- bat as manpager HOT 5
- Implement safety for ANSI escape sequences HOT 1
- `mkd` extension not displayed as Markdown HOT 1
- Is there a way to run bat with -f (similar to tail -f) to follow a file ? HOT 1
- Add From impls for PrettyPrinter HOT 1
- Shell auto-completion for `--theme` list the default theme incorrectly
- highlight pcap files piped from tcpdump or tshark HOT 1
- Add `bat --wrap word` HOT 3
- dog and cat
- Document default theme HOT 1
- Adding Catppuccin Bat Themes
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bat.