You are not logged in.
i have exhausted all my possibilities at this point so asking the community for some guidance.
Terminal: urxvt
localectl status:
System Locale: LANG=sv_SE.UTF8
VC Keymap: sv-latin1
X11 Layout: se
X11 Model: pc105
X11 Options: terminate:ctrl_alt_bksp
locale:
LANG=en_US-UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8
Part of the problem is that the asterix(star) * is not representing right keycode or something.
for example,
ls -l | grep *.txt //returns nothing even if it has results.
also in tab compleate it adds parts of the command into the other command
or adds it again like pacman pacman or pacmanpac.
Also if you do just * it will return the first order file name from the directory;
zsh: command not found: c-notes.log
locale -a:
C
en_US.utf8
POSIX
sv_SE.utf8
vconsole.conf
KEYMAP=sv-latin1
FONT=ter-112n
locale.conf
LANG=sv_SE.UTF8
Any words of wisdom into this would be greatly appreciated.
-Thanks in advance
Last edited by Learning (2014-10-12 21:14:55)
Offline
It is Zsh's standard behaviour. What does `echo *.txt` return?
Offline
It is Zsh's standard behaviour. What does `echo *.txt` return?
it returns txt files from the directory.
on that note i also tried ls | grep *.txt outside from Zsh and it won't return anything.
i belive i messed up something with my locale or vconsole or font or something but i looked at it for so long
i think i'm in a tunnel so thats why i posted it so maybe someone can see something.
Last edited by Learning (2014-10-12 20:22:24)
Offline
Have you aliased `ls`?
Offline
The asterisk is expanded, so you are grepping for a line containing every text file in that directory. I think you want just "grep '\.txt'" or (the logically equivalent but needlessly longer) "grep '.*\.txt'"
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Have you aliased `ls`?
ls='ls --color=auto'
Offline
This has nothing to do with ls, you are getting the expected results. You are simply using grep incorrectly.
$ touch one.txt two.txt three.txt
$ ls *.txt
one.txt three.txt two.txt
$ ls *.txt | grep *.txt
$ ls *.txt | grep '*.txt'
$ ls *.txt | grep '.*\.txt'
one.txt
three.txt
two.txt
$ ls *.txt | grep '.txt'
one.txt
three.txt
two.txt
$ ls *.txt | grep '\.txt$'
one.txt
three.txt
two.txt
The last one is probably what you want.
Of course if this is actually for ls, you should just pass the parameter to ls itself as in the second command above `ls -l *.txt`.
Note that the third command above, or any variation of `ls | grep *.txt`, would expand to `ls | grep one.txt two.txt three.txt` before anything else is done. The shell expands any unquoted or unescapted wildcard characters before grep is even called.
Last edited by Trilby (2014-10-12 20:38:12)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
This has nothing to do with ls, you are getting the expected results. You are simply using grep incorrectly.
$ touch one.txt two.txt three.txt $ ls *.txt one.txt three.txt two.txt $ ls *.txt | grep *.txt ..
The last one is probably what you want.
Of course if this is actually for ls, you should just pass the parameter to ls itself as in the second command above `ls -l *.txt`.
yeah never thought ls was the problem, but the grep might be a miss use but should it not return the txt files or anything else it has done so in the past and when testing,
elsewhere, it did work: but in a sense that is not the big issue here in all of this is that i suspect that the keymap is not handling the input from the terminal the right way.
Last edited by Learning (2014-10-12 20:42:09)
Offline
Can you give an example of a command that is not working the way it should? So far what you've shown is to be expected - I don't see evidence of anything wrong at all.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
not in a sense of a command but even when the vconsole/locale.conf has an for example swedish key set it ignores it and returns
[\398] so it is more of a sense: keys are possibly returing something else when reading the keycode/keymap.
Offline
I'm now completely lost. So the actual problem has nothing to do with anything discussed in this thread? Perhaps you should start again and describe what the problem actually is.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
I'm now completely lost. So the actual problem has nothing to do with anything discussed in this thread? Perhaps you should start again and describe what the problem actually is.
Well the * < was just a part for me that did not work as it had before and for me it is a glyph char; so thats why i linked it to the other problem but it might not be that at all.
in short the big issue is that even if its set to US or SV/SE it does not link up correctly with pressed keys, for example åäö < returns as keycodes.
and in directory it returns as scramble. if you use anything with a glyph aspect to it.
Last edited by Learning (2014-10-12 20:59:30)
Offline
solved it it was problem with the keymap/keycodes thanks!
Offline