LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-18-2017, 07:39 PM   #1
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,212

Rep: Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936Reputation: 936
Post Command-line productivity: fasd


I have recently been trying out bash-it (something like oh-my-zsh for bash), and I stumbled upon fasd (which bash-it has a plugin for). It is for accessing recent files and directories (based on Mozilla's frecency algorithm). I've found it really useful, even with only a few commands. The four basic ones are: f(iles), a(ll), s(elect), d(irectories).

f, a, and d start search commands, and if you prefix with s then you can select from a list. There is also z, which jumps directly into a directory. So;

Code:
# pwd
/home/user
# z sferic
# pwd
~/media/music/Shackleton & Vengeance Tenfold/Sferic Ghost Transmits
fasd becomes particularly useful with aliases, for example;
Code:
alias e='f -i -e "emacs -nw"'
This will interactively open a recently accessed file with emacs. So, say I want to edit my awesomewm config file (which is ~/.config/awesome/rc.lua), from any directory I could just do;
Code:
e rclua
and it opens up. If it was an ambiguous search, then the -i flag in the alias makes it present a selection list;
Code:
# e rc

5	2          /home/user/.mbsyncrc
4	4          /etc/rc.d/rc.firewall
3	6.48966    /home/user/.weechat/irc.conf
2	28.7322    /home/user/.bashrc
1	39.4607    /home/user/.config/awesome/rc.lua
>
and you choose the index number to open that file. There's a lot more than can be done, but I find just these little things very handy. There's more info on the fasd page, and its also on SBo.

Last edited by drgibbon; 02-19-2017 at 04:01 AM.
 
Old 02-20-2017, 10:16 AM   #2
NoStressHQ
Member
 
Registered: Apr 2010
Location: Geneva - Switzerland ( Bordeaux - France / Montreal - QC - Canada)
Distribution: Slackware 14.2 - 32/64bit
Posts: 609

Rep: Reputation: 221Reputation: 221Reputation: 221
I'd like to vote as "useful", but I can't because it's the OM . So thank you for the hints !

Cheers !

Garry.
 
Old 02-20-2017, 01:19 PM   #3
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,198

Rep: Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307Reputation: 5307
I use FISH. I see that there are ports to both oh-my-fish and fisherman.

As for adding FISH support to the actual project: I'm thinking about it, but the fact that they didn't look at the work I did to fix their tcsh support makes me reluctant to help them any more.

https://github.com/clvv/fasd/pull/106

Last edited by dugan; 02-20-2017 at 01:22 PM.
 
Old 02-20-2017, 04:25 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,103

Rep: Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117Reputation: 4117
Quote:
Originally Posted by NoStressHQ View Post
I'd like to vote as "useful", but I can't because it's the OM . So thank you for the hints !
You can click the "rep" (small) link on the left - and add a (non-public) comment if you wish.
 
1 members found this post helpful.
Old 02-20-2017, 09:11 PM   #5
NoStressHQ
Member
 
Registered: Apr 2010
Location: Geneva - Switzerland ( Bordeaux - France / Montreal - QC - Canada)
Distribution: Slackware 14.2 - 32/64bit
Posts: 609

Rep: Reputation: 221Reputation: 221Reputation: 221
Quote:
Originally Posted by syg00 View Post
You can click the "rep" (small) link on the left - and add a (non-public) comment if you wish.
Thank you !
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Cursor does not move to the bottom line and overwrite to same line on command line mesuutt Linux - Newbie 3 02-25-2012 08:04 AM
Print all PID folders from /proc line-by-line with this format (( PID: command-line )) courteous Linux - Newbie 7 12-12-2010 04:47 PM
awk command line: blank line record sep, new line field sep robertmarkbram Programming 4 02-21-2010 05:25 AM
xine command line? or some other command line only engine? lumix Linux - Software 2 08-10-2007 10:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration