Giter VIP home page Giter VIP logo

cp-p's People

Contributors

ahmedhalim96 avatar ericpaulbishop avatar naheel-azawy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cp-p's Issues

not working ubuntu - google-colab

image

Calculating size...Copying...awk: line 43: function systime never defined
awk: line 43: function systime never defined
awk: line 43: function systime never defined
Done copying

it din't copy anything ,

!cp-p "/content/drive/MyDrive/g/ELDEN RING [FitGirl Repack].zip" /content/drive/MyDrive/t the CMD i used in colab

Weird copy naming behavior (nesting)

My goal is to create multiple copies of a single directory in lf.

My paste command look like this (taken from readme with one echo added):

# pasting done right
cmd paste ${{
	send="while read -r line; do lf -remote \"send $id echo \$line\"; done && lf -remote 'send reload'"
	load=$(lf -remote 'load')
	mode=$(echo "$load" | sed -n '1p')
	list=$(echo "$load" | sed '1d')
	s='' && [ ! -w . ] && s='sudo'
	case "$mode" in
		copy) cmd='cp-p';; move) cmd='mv-p';;
	esac
	cmd="$cmd --new-line"
	for f in $list; do
	$s sh -c "$cmd --backup=numbered \"$f\" . | $send &"
	echo "$cmd --backup=numbered \"$f\" . | $send &"
	done
	lf -remote 'send load'
	lf -remote 'send clear'
}}

My directory structure look like this:

test-dir/
  - file1
  - file2

My aim is to have this structure:

test-dir/
  - file1
  - file2
test-dir-copy1/
  - file1
  - file2
test-dir-copy2/
  - file1
  - file2

But what I get is this:

test-dir/
  - file1
  - file2
test-dir-new/
  - test-dir/
    - file1
    - file2
  - file1
  - file2

Steps to replicate:

  • open lf
  • highlight test-dir
  • press y
  • press p
  • quit lf (press q)
  • observe directory structure
  • repeat once more

These is the exact output I get:

~/cp-p-test $ lf
cp-p --new-line --backup=numbered "/home/mik/cp-p-test/test-dir" . | while read -r line; do lf -remote "send 1000 echo $line"; done && lf -remote 'send reload' &
~/cp-p-test $ ls -R .
.:
test-dir/  test-dir-new/

./test-dir:
file1  file2

./test-dir-new:
file1  file2
~/cp-p-test $ lf
cp-p --new-line --backup=numbered "/home/mik/cp-p-test/test-dir" . | while read -r line; do lf -remote "send 1000 echo $line"; done && lf -remote 'send reload' &
~/cp-p-test $ ls -R .
.:
test-dir/  test-dir-new/

./test-dir:
file1  file2

./test-dir-new:
file1  file2  test-dir/

./test-dir-new/test-dir:
file1  file2
~/cp-p-test $

It seems like the determining of a new directory name is producing the same name (even if it already exists) and then proceeds to paste inside it.

Not working

I was trying to integrate this into my lf config, but for some reason, it wasn't working.

Tried running the scripts directly from the cloned repo, and this is the result
image

Not sure how to debug this myself and I'm pretty bad with bash, so any help is greatly appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.