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
ef8e63a7
Unverified
Commit
ef8e63a7
authored
Jul 12, 2022
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(lib): prefer `xsel` over `xclip` in clipboard.zsh
See #10925
parent
39573125
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
clipboard.zsh
lib/clipboard.zsh
+4
-4
No files found.
lib/clipboard.zsh
View file @
ef8e63a7
...
...
@@ -10,8 +10,8 @@
# - pbcopy, pbpaste (macOS)
# - cygwin (Windows running Cygwin)
# - wl-copy, wl-paste (if $WAYLAND_DISPLAY is set)
# - xclip (if $DISPLAY is set)
# - xsel (if $DISPLAY is set)
# - xclip (if $DISPLAY is set)
# - lemonade (for SSH) https://github.com/pocke/lemonade
# - doitclient (for SSH) http://www.chiark.greenend.org.uk/~sgtatham/doit/
# - win32yank (Windows)
...
...
@@ -60,12 +60,12 @@ function detect-clipboard() {
elif
[
-n
"
${
WAYLAND_DISPLAY
:-}
"
]
&&
((
${
+commands[wl-copy]
}
))
&&
((
${
+commands[wl-paste]
}
))
;
then
function
clipcopy
()
{
cat
"
${
1
:-
/dev/stdin
}
"
| wl-copy &>/dev/null &|
;
}
function
clippaste
()
{
wl-paste
;
}
elif
[
-n
"
${
DISPLAY
:-}
"
]
&&
((
${
+commands[xclip]
}
))
;
then
function
clipcopy
()
{
cat
"
${
1
:-
/dev/stdin
}
"
| xclip
-selection
clipboard
-in
&>/dev/null &|
;
}
function
clippaste
()
{
xclip
-out
-selection
clipboard
;
}
elif
[
-n
"
${
DISPLAY
:-}
"
]
&&
((
${
+commands[xsel]
}
))
;
then
function
clipcopy
()
{
cat
"
${
1
:-
/dev/stdin
}
"
| xsel
--clipboard
--input
;
}
function
clippaste
()
{
xsel
--clipboard
--output
;
}
elif
[
-n
"
${
DISPLAY
:-}
"
]
&&
((
${
+commands[xclip]
}
))
;
then
function
clipcopy
()
{
cat
"
${
1
:-
/dev/stdin
}
"
| xclip
-selection
clipboard
-in
&>/dev/null &|
;
}
function
clippaste
()
{
xclip
-out
-selection
clipboard
;
}
elif
((
${
+commands[lemonade]
}
))
;
then
function
clipcopy
()
{
cat
"
${
1
:-
/dev/stdin
}
"
| lemonade copy
;
}
function
clippaste
()
{
lemonade
paste
;
}
...
...
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