LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-25-2015, 05:49 PM   #1
damuser
LQ Newbie
 
Registered: Dec 2015
Posts: 3

Rep: Reputation: Disabled
Best shell script editor?


Hello all. Hope this is the best place for this question.
I am looking for the best shell script editor. Ultimately, it would be great if there was one that supported auto complete and would allow you to select available functions, etc.

Thank you in advance.
 
Old 12-25-2015, 05:56 PM   #2
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
Geany...pretty good, Bluefish...great...both GUI...completion, never tried, never needed it...code coloring, both yes...
I doubt CLI editors have completion, unless I'm (very possibly) mistaken
Welcome to the forum
Keep the questions comming
Melissa
 
1 members found this post helpful.
Old 12-25-2015, 06:13 PM   #3
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
http://usevim.com/2012/07/06/vim101-completion/
 
1 members found this post helpful.
Old 12-25-2015, 08:52 PM   #4
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Blog Entries: 2

Rep: Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567
Hi.

Kdevelop if you have the RAM, tho you will learn more with Vi*...

Last edited by jamison20000e; 12-25-2015 at 08:54 PM.
 
1 members found this post helpful.
Old 12-26-2015, 12:17 AM   #5
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,008

Rep: Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193Reputation: 3193
vim +1
 
Old 12-26-2015, 08:01 AM   #6
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by Thor_2.0 View Post
Geany...pretty good,
Yeah Geany what is what I use -- works great 4 me
 
Old 12-26-2015, 08:02 AM   #7
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by jamison20000e View Post
Hi.

Kdevelop if you have the RAM, tho you will learn more with Vi*...
only how to use VI+ -- bash script has nothing to do with VI -- VI is an editor BASH script is a langage that tells the computer what to do.
 
Old 12-26-2015, 09:28 AM   #8
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,678

Rep: Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712Reputation: 2712
VIM GVIM done

-1 BW-userx : do you not understand the question? The OP wants advice on an EDITOR to use for scripting BASH, so it DOES have to do with the answer!

I use VIM for all of my script development. Perl, Bash, Python, it all just works. Follow that link for completion, as I do not use that feature. I would use GVIM if I were restrained to use a GUI tool, but luckily I can open a terminal and do it faster and cleaner directly in the shell.
 
Old 12-26-2015, 09:36 AM   #9
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by wpeckham View Post
-1 BW-userx : do you not understand the question? The OP wants advice on an EDITOR to use for scripting BASH, so it DOES have to do with the answer!

I use VIM for all of my script development. Perl, Bash, Python, it all just works. Follow that link for completion, as I do not use that feature. I would use GVIM if I were restrained to use a GUI tool, but luckily I can open a terminal and do it faster and cleaner directly in the shell.
exialy it is an editor question using VI or a vareint of it does nothing to improve the BASH code, a flat file editor of any kind will work no matter what.
 
Old 12-26-2015, 10:27 AM   #10
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Blog Entries: 2

Rep: Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567
Geany has some good plugins too. If you want to go all out with GUI like Kdevelop (bells, whistles and such) Eclipse is cool?

Vi is grate because you learn the code not the editor!
 
Old 12-26-2015, 10:29 AM   #11
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Blog Entries: 2

Rep: Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567
Quote:
man vi
...
Quote:
VIM(1) General Commands Manual VIM(1)

NAME
vim - Vi IMproved, a programmers text editor

SYNOPSIS
...
 
1 members found this post helpful.
Old 12-26-2015, 11:09 AM   #12
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
Shell programming is text, be it BASH, KornShell, Shell or whatever, it's text.

That means a text editor is in order. Fancy-schmancy graphics? Uh, no, just text.

The base text editor is vi; however, in many Linux systems, vi is a symbolic link to elvis, "a clone of the ex/vi text editor" that has, over time, exhibited little glitches here and there and has been (and should be) replaced with vim, "Vi IMproved, a programmers text editor."

You'll probably find vi is /usr/bin/vi.
Code:
su -               { or use sudo }
<root password>
cd /usr/bin
ls -l vi
lrwxrwxrwx 1 root root 5 Nov 22  2013 vi -> elvis*
{ the symbolic link is to /usr/bin/elvis, you want to change that }
{ make sure you have vim }
ls -l vim
-rwxr-xr-x 1 root root 2235144 Oct  2  2013 vim*
{ yep, got it, make the link }
rm vi
ln -s vim vi
{ check it }
ls -l vi
lrwxrwxrwx 1 root root 3 Dec 26 12:16 vi -> vim*
Ctrl-D
vim has color syntax highlighting (which drives me nuts but you may like it). Doesn't have, have as fare as I know, completion. It works just fine.

Something you may not be aware of about vi/vim is that it has settings that are quite useful, especially for code.

Get into your home directory and do this:
Code:
cat > .exrc
set autoindent showmode showmatch
Ctrl-D
When you're typing code and hit the tab key at the beginning of a line the editor will automatically indent one level and stay there until you type another tab (to indent further) or Ctrl-D to back up one indent level. Makes your code readable.

The showmatch setting causes the cursor to jump back to a matching paren, bracket or brace when you type a closing paren, bracket or brace (), [], {}. Helps you get the right number of closings to openings; it just jumps, so you have to watch.

Hope this helps some.

Last edited by tronayne; 12-26-2015 at 11:22 AM. Reason: Forgot stuff
 
3 members found this post helpful.
Old 12-26-2015, 12:27 PM   #13
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Blog Entries: 2

Rep: Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567
Most teachers won't let you start with anything fancier than pure .txt, .sh, .html, .rb, etc..

e.g: if you only learn math with a calculator then what?

Last edited by jamison20000e; 12-26-2015 at 12:36 PM.
 
Old 12-26-2015, 01:10 PM   #14
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by tronayne View Post
Shell programming is text, be it BASH, KornShell, Shell or whatever, it's text.

That means a text editor is in order. Fancy-schmancy graphics? Uh, no, just text.

The base text editor is vi; however, in many Linux systems, vi is a symbolic link to elvis, "a clone of the ex/vi text editor" that has, over time, exhibited little glitches here and there and has been (and should be) replaced with vim, "Vi IMproved, a programmers text editor."

You'll probably find vi is /usr/bin/vi.
Code:
su -               { or use sudo }
<root password>
cd /usr/bin
ls -l vi
lrwxrwxrwx 1 root root 5 Nov 22  2013 vi -> elvis*
{ the symbolic link is to /usr/bin/elvis, you want to change that }
{ make sure you have vim }
ls -l vim
-rwxr-xr-x 1 root root 2235144 Oct  2  2013 vim*
{ yep, got it, make the link }
rm vi
ln -s vim vi
{ check it }
ls -l vi
lrwxrwxrwx 1 root root 3 Dec 26 12:16 vi -> vim*
Ctrl-D
vim has color syntax highlighting (which drives me nuts but you may like it). Doesn't have, have as fare as I know, completion. It works just fine.

Something you may not be aware of about vi/vim is that it has settings that are quite useful, especially for code.

Get into your home directory and do this:
Code:
cat > .exrc
set autoindent showmode showmatch
Ctrl-D
When you're typing code and hit the tab key at the beginning of a line the editor will automatically indent one level and stay there until you type another tab (to indent further) or Ctrl-D to back up one indent level. Makes your code readable.

The showmatch setting causes the cursor to jump back to a matching paren, bracket or brace when you type a closing paren, bracket or brace (), [], {}. Helps you get the right number of closings to openings; it just jumps, so you have to watch.

Hope this helps some.
and about NANO ? thats easy to use and writes text too
 
1 members found this post helpful.
Old 12-26-2015, 01:13 PM   #15
damuser
LQ Newbie
 
Registered: Dec 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thank you for all the replies. I will check a couple of these out today. =0)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
which shell script editor is better ust Linux - Newbie 12 05-29-2012 10:34 AM
How to pass command line arguments from one shell script to another shell script VijayaRaghavanLakshman Linux - Newbie 5 01-20-2012 09:12 PM
Executing a Shell script with 654 permissions inside another shell script. changusee2k Linux - Newbie 2 06-07-2011 07:58 PM
shell script editor with ssh capability? gvanto Linux - Newbie 2 05-15-2011 01:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration