Moderators: phlip, Moderators General, Prelates
phlip wrote:Ha HA! Recycled emacs jokes.
phlip wrote:Ha HA! Recycled emacs jokes.
enk wrote:If all that info annoyed me, I'd use ls -1 so I got the output in one column. I find several columns harder to look through both when I can't remember exactly what I'm looking for or if it's something specific.
The only advantage of pure ls I can see is that it crams more filenames into one screen, which is useful in folders with a lots of content. And then again, if that output fills more than one screen, ls -x would make it easier too look through. Or even ls -m
Akula wrote:Our team has turned into this hate-fueled juggernaut of profit. It's goddamn wonderful.
alias ls 'ls \!* | ~/bin/natsort -f'Dingbats wrote:I use ls normally, and ls -l when I need to know the permissions/sizes/etc of stuff.
wing wrote:I use raw ls. It's cool when I have less than a screenfull of stuff to be displayed anyway. If I have more, ls | less which arranges it into a single column.
OmenPigeon wrote:If you were really desperate for the output of ls in one column without all the extra stuff and without using less you could do something like 'ls -l | cut -c 54-', but that seems a little excessive. It also makes the pretty colors go away.
phlip wrote:Ha HA! Recycled emacs jokes.
enk wrote:@EvanED: What does ls \!* do? Doesn't do anything in my bash.. or do you just have a lot of filenames beginning with "!"?
Edit: Ah..... I see someone's using zsh. But still, what is it?
EvanED wrote:enk wrote:@EvanED: What does ls \!* do? Doesn't do anything in my bash.. or do you just have a lot of filenames beginning with "!"?
Edit: Ah..... I see someone's using zsh. But still, what is it?
csh actually. This is school account, and I haven't changed the default. (zsh isn't available there, or I would.)
It substitutes arguments. Otherwise, if I said "ls blah.txt", I'm pretty sure it would do something like "ls | natsort -f blah.txt", which isn't what I want. I want "ls blah.txt | natsort -f".
phlip wrote:Ha HA! Recycled emacs jokes.
enk wrote:So \!* is for only used in aliases? I was curious so I installed csh, and that's what it seemed like to me. But here it seems to work fine sending the arguments to ls...
9. emperor10 ~/temp: alias t 'ls | ~/bin/natsort -f'
10. ~/temp: t
1-File
2-File
10-File
file1
file2
File3
file10
File11
11. ~/temp: t file*
1-File
2-File
10-File
file1
file2
File3
file10
File11
12. ~/temp: alias t 'ls \!* | ~/bin/natsort -f'
13. ~/temp: t file*
file1
file2
file10
14. ~/temp:phlip wrote:Ha HA! Recycled emacs jokes.
alias l=ls; alias ll='ls -l'3.14159265... wrote:What about quantization? we DO live in a integer world?
crp wrote:oh, i thought you meant the entire funtion was f(n) = (-1)^n
i's like girls u crazy
adlaiff6 wrote:
- Code: Select all
alias ll='ls -l'
pieaholicx wrote:What really screws me up is when I try to use ls on Windows. It doesn't like it for some crazy reason.
phlip wrote:Ha HA! Recycled emacs jokes.
pieaholicx wrote:adlaiff6 wrote:
- Code: Select all
alias ll='ls -l'
That part I like, and do. Otherwise I just use ls. What really screws me up is when I try to use ls on Windows. It doesn't like it for some crazy reason.
alias la='ls -a'; alias lla='ls -la'3.14159265... wrote:What about quantization? we DO live in a integer world?
crp wrote:oh, i thought you meant the entire funtion was f(n) = (-1)^n
i's like girls u crazy
Pobega wrote:I'd find it weird if someone out there used ls -l for tasks that just ls can accomplish. There's no reason to clog your screen up with useless information.
c() { clear ; cd $1 ; pwd -P ; echo ; ls --color=auto -l ; }
ca() { clear ; cd $1 ; pwd -P ; echo ; ls --color=auto -al ; }phlip wrote:Ha HA! Recycled emacs jokes.
EvanED wrote:One of these days I need to go through and start adding some customizations. Anther one I like is something like 'alias mk 'mkdir /!* ; cd /!*'' (untested, no clue if it should work) to make a directory and immediately cd into it. 95% of the time I make a directory that's what I do next anyway. (Vista actually does this in explorer, and it's quite nice. The above idea dates to before I knew that though.)
mkcd() { mkdir $1 ; cd $1 ; }phlip wrote:Ha HA! Recycled emacs jokes.
pieaholicx wrote:adlaiff6 wrote:
- Code: Select all
alias ll='ls -l'
That part I like, and do. Otherwise I just use ls. What really screws me up is when I try to use ls on Windows. It doesn't like it for some crazy reason.
alias l='ls -Fl --time-style="+%Y-%m-%d %H:%M:%S" --si'
LikwidCirkel wrote:I hardly even use ls at all anymore when I've got the double tab listing capabilities of bash!
phlip wrote:Ha HA! Recycled emacs jokes.
LikwidCirkel wrote:I hardly even use ls at all anymore when I've got the double tab listing capabilities of bash!
enk wrote:LikwidCirkel wrote:I hardly even use ls at all anymore when I've got the double tab listing capabilities of bash!
Now if I could only get bash to list stuff in a single column....
Vim can do it in a single row, but that's not as good![]()
Also, if I could get bash to list file sizes in bytes and human-readable at the same time... and if would list the size of the content of folders instead.... Is this possible?
(and I want it in the same column as the file sizes - otherwise I'll use du -s */)
LikwidCirkel wrote:enk wrote:LikwidCirkel wrote:I hardly even use ls at all anymore when I've got the double tab listing capabilities of bash!
Now if I could only get bash to list stuff in a single column....
Vim can do it in a single row, but that's not as good![]()
Also, if I could get bash to list file sizes in bytes and human-readable at the same time... and if would list the size of the content of folders instead.... Is this possible?
(and I want it in the same column as the file sizes - otherwise I'll use du -s */)
That actually might be possible to set up!
http://www.gnu.org/software/bash/manual/bashref.html#Programmable-Completion
Bash uses some config stuff to call compgen, or complete, or something like that, depending on the program that you're trying to invoke. This can take options like
-A builtin
Names of shell builtin commands. May also be specified as -b.
In theory, you should be able to use an ls command with options to do autocomplete. I think you might have to specify the behavior of each program that this would work for though, but cd would be a good start.
Now you've got me fascinated, and I'll have to dig deeper.
3.14159265... wrote:What about quantization? we DO live in a integer world?
crp wrote:oh, i thought you meant the entire funtion was f(n) = (-1)^n
i's like girls u crazy
adlaiff6 wrote:At the risk of smearing the boundaries between threads, why not just use zsh and get it all over with?
alias l='ls --color=auto -trl'
alias ll='ls --color=auto -trlL'
alias lll='ls --color=auto -trl | less'
alias la='ls --color=auto -trlA'
alias lsd='ls --color=auto -trld'
alias lsda='ls --color=auto -trldA'
alias lss='ls --color=auto -Srl'
alias lsr='ls --color=auto -Sl'
Users browsing this forum: cemper93 and 3 guests