Giter Club home page Giter Club logo

Comments (7)

Catalyn45 avatar Catalyn45 commented on August 16, 2024

disown is a BASH shell built-in, so if the shell is set to sh or not set at all (which defaults to sh) this will not work.
you could use set shell bash.

from lf.

og900aero avatar og900aero commented on August 16, 2024

disown is a BASH shell built-in, so if the shell is set to sh or not set at all (which defaults to sh) this will not work. you could use set shell bash.

I modify to set shell bash
But doesnt work: when close lf, then google-chrome closing too.

from lf.

joelim-work avatar joelim-work commented on August 16, 2024

You can try using setsid as mentioned in the documentation

from lf.

Catalyn45 avatar Catalyn45 commented on August 16, 2024

maybe you can try something like that?
image

from lf.

og900aero avatar og900aero commented on August 16, 2024

You can try using setsid as mentioned in the documentation

Thx, this working, when change to cmd open &{{
and
lf -remote "send $id $$EDITOR $f"

This working, but...I use a file check to see if sudo should be used (unfortunately, this function is not included in lf), and not working this method:

*)
	        for f in $fx; do
	        	if sudo -u "$USER" test -w "$f"; then
	        		lf -remote "send $id \$$EDITOR \$f"
	        	else
	        		lf -remote "send $id \$sudo -A \$$EDITOR \$f"
	        	fi
	        done;;

When open any config file must be sudo, then I get error message now: "-: 2: nano: parameter not set"

from lf.

joelim-work avatar joelim-work commented on August 16, 2024

I guess you can't use & if sudo because it needs to be connected to the terminal so you can authenticate, I could be wrong about that though.

But I'm not sure why you had to change to & in the first place - setsid worked fine for me when I used $, I just had to pipe stderr to /dev/null.

from lf.

og900aero avatar og900aero commented on August 16, 2024

I guess you can't use & if sudo because it needs to be connected to the terminal so you can authenticate, I could be wrong about that though.

But I'm not sure why you had to change to & in the first place - setsid worked fine for me when I used $, I just had to pipe stderr to /dev/null.

I changed it to & because that way it stopped flickering when I open something

I have a solution:
lf -remote "send $id \$bash -c 'sudo -A $EDITOR $f'"

But I still say that it would be nice if there was an option in lf to request a sudo prompt to the bottom (or even the sudo -A option), instead of having to quickly open another window with sudo lf .

from lf.

Related Issues (20)

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.