Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
4506210c
Unverified
Commit
4506210c
authored
Jun 19, 2022
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(lib): don't attach to tty in `wl-copy` and `xclip` (#10953)
Fixes #10925
parent
5336e59d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
clipboard.zsh
lib/clipboard.zsh
+2
-2
No files found.
lib/clipboard.zsh
View file @
4506210c
...
...
@@ -58,10 +58,10 @@ function detect-clipboard() {
function
clipcopy
()
{
cat
"
${
1
:-
/dev/stdin
}
"
>
/dev/clipboard
;
}
function
clippaste
()
{
cat
/dev/clipboard
;
}
elif
[
-n
"
${
WAYLAND_DISPLAY
:-}
"
]
&&
((
${
+commands[wl-copy]
}
))
&&
((
${
+commands[wl-paste]
}
))
;
then
function
clipcopy
()
{
wl-copy <
"
${
1
:-
/dev/stdin
}
"
;
}
function
clipcopy
()
{
wl-copy <
"
${
1
:-
/dev/stdin
}
"
&>/dev/null &|
;
}
function
clippaste
()
{
wl-paste
;
}
elif
[
-n
"
${
DISPLAY
:-}
"
]
&&
((
${
+commands[xclip]
}
))
;
then
function
clipcopy
()
{
xclip
-in
-selection
clipboard <
"
${
1
:-
/dev/stdin
}
"
;
}
function
clipcopy
()
{
xclip
-in
-selection
clipboard <
"
${
1
:-
/dev/stdin
}
"
&>/dev/null &|
;
}
function
clippaste
()
{
xclip
-out
-selection
clipboard
;
}
elif
[
-n
"
${
DISPLAY
:-}
"
]
&&
((
${
+commands[xsel]
}
))
;
then
function
clipcopy
()
{
xsel
--clipboard
--input
<
"
${
1
:-
/dev/stdin
}
"
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment