Register
It is currently Mon Oct 20, 2014 3:38 am

Custom use of auto-completion


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Tue Mar 02, 2010 1:37 pm   
User avatar

Joined: Sun Nov 01, 2009 8:59 am
Posts: 25
Location: Try to guess!
Jut a quick question, is it possible to somehow enable path auto-completion, e.g. while asking the user to enter a path
Code:
read -p "Insert path:" path


Top
 Profile  
 PostPosted: Wed Jun 22, 2011 7:42 pm   
User avatar

Joined: Wed Jun 08, 2011 8:27 am
Posts: 189
Location: outer Shpongolia
Yes, with the -e option of read(0).

From the help(0) text:
« -e use Readline to obtain the line in an interactive shell »

Code:
read -erp 'Insert path: '


You might want to check rlwrap(1) too.


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP