Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-21-2006, 03:04 PM
|
#1
|
Member
Registered: Apr 2004
Distribution: Slackware 11.0, OpenBSD 4.0
Posts: 58
Rep:
|
xterm and bash completion
When pressing control+shift+? in a bash shell it should return all possible completions. Unfortunately this doesn't work in xterm. When I press control+shift+? the following character gets displayed: ¿
I have never used this character and I don't need it, i want to have the default action (displaying possible completions), it is working in rxvt, aterm and in the kde konsole but not in xterm!
Does anyone know how to fix that?
|
|
|
07-21-2006, 07:01 PM
|
#2
|
Member
Registered: Jun 2003
Distribution: SuSE, Slackware, Gentoo
Posts: 207
Rep:
|
Can you explain more what you mean by completions? Are you refering to command history or the equivalent of the tab key in bash to auto complete commands that haven't been fully typed in?
|
|
|
07-21-2006, 07:31 PM
|
#3
|
Member
Registered: Apr 2004
Distribution: Slackware 11.0, OpenBSD 4.0
Posts: 58
Original Poster
Rep:
|
Sorry,
the question was dumb...
I made a mistake:
I did not meant "control+shift+?", I meant "alt+?". The reason I confused this is because I have a german keyboard.
I am talking about commands (or file names) that haven't been fully typed in. So, for example, if I am in a directory with 4 files in it:
Code:
$ ls -l
total 0
-rw-r--r-- 1 max users 0 2006-07-22 01:16 afile
-rw-r--r-- 1 max users 0 2006-07-22 01:16 afile1
-rw-r--r-- 1 max users 0 2006-07-22 01:16 file
-rw-r--r-- 1 max users 0 2006-07-22 01:16 file1
When typing 'ls af' and then "alt+?" I get the following result in aterm:
Code:
$ ls af (pressing 'alt+?')
afile afile1
$ ls af
When I type 'ls fi' followed by "alt+?":
Code:
$ ls fi
file file1
$ ls fi
This does not work in xterm and I don't have a clue why..
Instead, when pressing "alt+?" the following symbol is written:
¿
I want to be able to use this kind of completion in xterm.
Thanks for answering!
Last edited by athanatos; 07-21-2006 at 07:45 PM.
|
|
|
07-21-2006, 07:34 PM
|
#4
|
Member
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816
Rep:
|
I don't know for xterm properly, but I always get completion pressing [TAB] twice
PS: I did get it too by pressing [ALT]+[?] (note: getting a [?] with the US keyboard implies pressing [shift] too)
Last edited by raska; 07-21-2006 at 07:35 PM.
|
|
|
07-21-2006, 07:50 PM
|
#5
|
Member
Registered: Jun 2003
Distribution: SuSE, Slackware, Gentoo
Posts: 207
Rep:
|
No worries athanatos, just needed a little clarification.
When you are in xterm, type in . It is possible it is invoking a shell other than Bash (which supports this feature.)
Let me know what you find.
|
|
|
07-21-2006, 07:57 PM
|
#6
|
Member
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816
Rep:
|
I was checking with xterm. It does the completion by pressing [TAB] twice.
athanatos, could you confirm this if it's working ok for you too?
@unreal128
xterm uses bash as shell, or any that the user has defined, don't mess the things up.
|
|
|
07-21-2006, 07:58 PM
|
#7
|
Member
Registered: Apr 2004
Distribution: Slackware 11.0, OpenBSD 4.0
Posts: 58
Original Poster
Rep:
|
Hi!
$SHELL is set to '/bin/bash'. [ALT]+[?] works correctly with every other virtual terminal I've tried so far (rxvt, aterm, kde konsole), but not xterm..
@raska
pressing tab twice is working correctly. I was just wondering if it is possible to get [ALT]+[?] working normally in xterm (pressing tab twice has not exactly the same effect).
Last edited by athanatos; 07-21-2006 at 08:01 PM.
|
|
|
07-21-2006, 08:24 PM
|
#8
|
Member
Registered: Jun 2003
Distribution: SuSE, Slackware, Gentoo
Posts: 207
Rep:
|
@raska
Thanks for the clarification. So for future reference, does xterm inherit the profile by the user instantiating it or is it a setting in a file?
@athanatos
I have a US keyboard layout and alt+? works for me in xterm. I would check the key bindings for xterm and maybe we can compare to see how it is different. BTW, do you have a US keyboard laying around? Maybe we could hook it up, temporarily alter the XFree86 config file to use "us" and see if it works.
|
|
|
07-21-2006, 08:46 PM
|
#9
|
Member
Registered: Apr 2004
Distribution: Slackware 11.0, OpenBSD 4.0
Posts: 58
Original Poster
Rep:
|
Quote:
Originally Posted by unreal128
BTW, do you have a US keyboard laying around? Maybe we could hook it up, temporarily alter the XFree86 config file to use "us" and see if it works.
|
I have tried that, but I got the same results (ending up with ¿).
Quote:
Originally Posted by unreal128
I would check the key bindings for xterm and maybe we can compare to see how it is different.
|
How to do that? Do you mean the output of 'stty -a'? I have not altered the default xterm settings by the way.
|
|
|
07-21-2006, 09:13 PM
|
#10
|
Member
Registered: Jun 2003
Distribution: SuSE, Slackware, Gentoo
Posts: 207
Rep:
|
I think I might have something here. Which shift key are you holding down on; the left or right? I noticed in xterm, it will only work with left alt and shift being held down.
|
|
|
07-21-2006, 09:31 PM
|
#11
|
Member
Registered: Apr 2004
Distribution: Slackware 11.0, OpenBSD 4.0
Posts: 58
Original Poster
Rep:
|
I tried both shift keys, '¿' is being printed with the following combinations:
- alt and left shift
- alt and right shift
- I also get ¿ when pressing [Alt Gr]+[left/right Shift]+[?]
|
|
|
07-22-2006, 01:29 PM
|
#12
|
Member
Registered: Jun 2003
Distribution: SuSE, Slackware, Gentoo
Posts: 207
Rep:
|
Sorry athanatos, it looks like the issue is beyond my skills.
You may want to dig into how the keys are mapped (eg. Xmodmap) and see what keycodes are being sent when these keys are being pressed.
|
|
|
07-22-2006, 01:47 PM
|
#13
|
Member
Registered: Apr 2004
Distribution: Slackware 11.0, OpenBSD 4.0
Posts: 58
Original Poster
Rep:
|
Thank you anyway unreal128 !
I think I will take a deep look at various xterm-resources which can be placed in the ~/.Xresources file. If I find something I will post the solution.
|
|
|
All times are GMT -5. The time now is 04:51 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|