Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

script execonbash to open directly scripts .sh with bash with example "; + o" #1922

Closed
wants to merge 2 commits into from

Conversation

wachin
Copy link

@wachin wachin commented Aug 25, 2024

I am using the nnn file manager in Linux in the terminal and I want to run some .sh files which are scripts that I have, to run them I do the following in nnn I put myself on top of the script.sh and I press "Ctrl + O" and it asks me: "open with" and I write: "bash" and I press Enter and it asks me: "c" li "g" ui? and I put c and it runs there ok. But I need my scripts to open in fewer steps, this is the solution. This script is called execonbash

execonbash-ezgif com-video-to-gif-converter

Note: On my keyboard to get ; I first have to press "Shift + ;"

The script I'm using in the gif is to automate doing git add . git commit -m and git push and it contains:

#!/bin/bash
### Auto push script
echo "Agregando cambios al stage..."
git add .
echo "Realizando commit..."
git commit -m "Actualización $(date)"
echo "Enviando cambios al repositorio remoto..."
git push origin main
echo "Proceso finalizado."
read

To the export is:

export NNN_PLUG='f:finder;o:execonbash;p:launch;v:imgview'

I am a spanish parlant

@jarun
Copy link
Owner

jarun commented Aug 26, 2024

This is a very trivial plugin. Please use it locally or share it in the discussions forum if you want others to use it.

@N-R-K can we have a tag/section plugins under discussions and move all plugin contributions there for people to find them easily?

@jarun jarun closed this Aug 26, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Dec 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants