11-16-2014
Bash-completion on shell script
Hello
I want use bash_completion on a script but the information on the internet give me not a solution.
The scrip start with "cd" to a direction
Than the script do "ls"
Than I must give a name of a sub-direction and here I want to use <TAB>, so when I have a direction with the name
smith and I give sm and than <TAB> than I want completion to smith.
When I have two names who begin with sm I must see the two possibilities.
When I use <TAB> on the terminal than everything works fine.
Only not from within a script.
Thanks anyway
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I really like tcsh's:
set completion='enhanced'
because it treats underscores and dash signs the same. I don't have to reach for the shift key when trying to complete files that have underscores. As far as I know, there is nothing like this in bash.
Does such a thing exist in bash? If... (2 Replies)
Discussion started by: sarnobat
2 Replies
2. Shell Programming and Scripting
hello,
I have been trying for a couple days to figure this out to no avail. I am converting some csh code to bash. I have converted everything except the completion code.
#bashrc (I set this alias in my bashrc)
alias test='source ${PATH}/test.sh'
#${PATH}/test.sh (returns some aliases and... (0 Replies)
Discussion started by: platypuus
0 Replies
3. Shell Programming and Scripting
Hello,
Bash completion is great, but there are some features I'd like to change. One thing is the behaviour when there are lots of very similar possibilities.
E.g., my directory contains 133 files, from pubmed_result1.txt to pubmed_result133.txt
$ ls Lyonprim/p
Display all 133... (2 Replies)
Discussion started by: jossojjos
2 Replies
4. Shell Programming and Scripting
Hi there!
I have this script which handles bookmarks. Bookmarks are basically a string that point to a certain path, e.g., project -> ~/code/projects/project.
Currently I have working completion for the bookmarks:
~ $ m p<Tab>
~ $ m project
What I want to implement now is the cd... (0 Replies)
Discussion started by: KevinSjoberg
0 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I'm having a problem with tab completion at the bash command line. For some reason, whenever I type g<tab>, the terminal will freeze up for 5-10 seconds before asking me if I want to display all 325 possibilities. I thought that maybe it's because of the high number of commands, but I have... (4 Replies)
Discussion started by: Raz716
4 Replies
6. Shell Programming and Scripting
Hello
I've followed several bash-completion threads, usualy none were answered, because of obvious reasons. (of which i'm just aware since a day or a few)
Non-the-less, because i was writing scripts, i never considered it to be possible to add this functionality.
Also, because i though that... (0 Replies)
Discussion started by: sea
0 Replies
7. UNIX for Advanced & Expert Users
Heyas
I'm trying to read out a file which contains a variable and use that list to complete a bash command.
Difficult part on this is, that 2 (actualy 3) different lists are to be used, but the 'dynamic' ones from the external file dont work properly.
It only seems to work with the list... (2 Replies)
Discussion started by: sea
2 Replies
8. UNIX for Advanced & Expert Users
Heyas
For my project TUI i had prepared bash completion.
Bash-completion works, at least if i source that file manualy.
However, when i'm installing it, it wont apply, not even for new opened terminals.
Allthough i had it working once, i dont get why it doesnt work now.
<...>
+ ''
+... (0 Replies)
Discussion started by: sea
0 Replies
9. Shell Programming and Scripting
Hi,
My goal is to connect from unix server A to windows server B and call a bat file on windows.
I am able to succeed in remoting to windows and executing a command, the issue i am facing is the shell scrip is exiting without making sure of bat file success.
Can you please help me in... (4 Replies)
Discussion started by: pxp018
4 Replies
LEARN ABOUT CENTOS
xcb_circulate_window
xcb_circulate_window(3) XCB Requests xcb_circulate_window(3)
NAME
xcb_circulate_window - Change window stacking order
SYNOPSIS
#include <xcb/xproto.h>
Request function
xcb_void_cookie_t xcb_circulate_window(xcb_connection_t *conn, uint8_t direction, xcb_window_t window);
REQUEST ARGUMENTS
conn The XCB connection to X11.
direction One of the following values:
XCB_CIRCULATE_RAISE_LOWEST
TODO: NOT YET DOCUMENTED.
XCB_CIRCULATE_LOWER_HIGHEST
TODO: NOT YET DOCUMENTED.
window The window to raise/lower (depending on direction).
DESCRIPTION
If direction is XCB_CIRCULATE_RAISE_LOWEST, the lowest mapped child (if any) will be raised to the top of the stack.
If direction is XCB_CIRCULATE_LOWER_HIGHEST, the highest mapped child will be lowered to the bottom of the stack.
RETURN VALUE
Returns an xcb_void_cookie_t. Errors (if any) have to be handled in the event loop.
If you want to handle errors directly with xcb_request_check instead, use xcb_circulate_window_checked. See xcb-requests(3) for details.
ERRORS
xcb_window_error_t
The specified window does not exist.
xcb_value_error_t
The specified direction is invalid.
SEE ALSO
xcb-requests(3)
AUTHOR
Generated from xproto.xml. Contact xcb@lists.freedesktop.org for corrections and improvements.
XCB
2014-06-10 xcb_circulate_window(3)