ish
ish copied to clipboard
Can't copy text more than 50 lines
I can't copy the text output if it goes beyond one screen. For example the output with "cat".
There is a 300 line yaml file. I'm trying to output and copy the contents of the file through cat. I select the text and pull down, but it fails - the selection is reset. Tried writing a python script with pyperclip - doesn't work in iSH. Tried xclip - requires x11.
Ladies and gentlemen, tell me how to copy text in ish if it goes beyond one screen.
Hi! You can also copy things by redirecting to /dev/clipboard, like this: cat file.yml > /dev/clipboard
Hi! You can also copy things by redirecting to /dev/clipboard, like this:
cat file.yml > /dev/clipboard
Oh, thanks a lot! I will try in few minutes!
Amazing! How could I miss it) Thanks a lot again.
Haha no worries - glad it could be easily resolved!
If you don’t mind I’m going to reopen this to track text selection being unusable.
Hi! You can also copy things by redirecting to /dev/clipboard, like this:
cat file.yml > /dev/clipboard
That is really useful. I’m happy that I found it. Is it also possible to use /dev/clipboard inside vim for y/p please?
Appears to be a new bug in iOS 16. fuck webview
I confirm that when copying more than 100-105 lines of code (for example, from chatGPT) to vim, the last lines are deleted. At the same time, it is copied normally to Apple Notes. I use "cat /dev/clipboard > file.py" to avoid this.
Hi! You can also copy things by redirecting to /dev/clipboard, like this:
cat file.yml > /dev/clipboardThat is really useful. I’m happy that I found it. Is it also possible to use
/dev/clipboardinside vim fory/pplease?
Vim installed in in iSH by apk add vim seems compiled without "clipboard" function, (by checking using :version inside vim), thus y/p won't communicate with clipboard out vim itself.
I tried hook yank action and remap p finally achieved that goal. You could take it as a reference.
function! WriteVariableToFile()
let content = @"
call writefile([content], '/dev/clipboard')
" echo "Variable written to clipnoard"
endfunction
command! WriteVariableToFile call WriteVariableToFile()
autocmd TextYankPost * call WriteVariableToFile()
function! ReplaceRegisterContent()
let lines = readfile('/dev/clipboard')
let content = join(lines, "\n")
call setreg('"', content)
endfunction
command! ReplaceRegisterContent call ReplaceRegisterContent()
nnoremap <silent> p :call ReplaceRegisterContent()<CR>p
@TravelTrader