You are not logged in.

#1 2009-01-18 05:15:32

yvonney
Member
Registered: 2008-06-11
Posts: 671

Way to database and invoke command in terminal? Cool way to trigger?

Hi... I'm thinking about all the code snippets I use... and just put into a text file and have to cut and paste.

Now that I'm getting ARCH savvy it would be great if there was a GURU-like way to have all my command at the ready instead of using the arrow keys to scroll 'back in time' to find the one i want...

IS there a way to trigger off commands that's really smart?

thanks!

Offline

#2 2009-01-18 05:27:15

pauldonnelly
Member
Registered: 2006-06-19
Posts: 776

Re: Way to database and invoke command in terminal? Cool way to trigger?

Are you talking about an easy way to access common commands, or a way to get at your command history? If the former, I guess you could use Acme as your shell. Or some file managers let you set up a menu for commands you use a lot. If the latter, you can use ^r to search back through your history.

Offline

#3 2009-01-18 05:29:10

kludge
Member
Registered: 2008-08-03
Posts: 294

Re: Way to database and invoke command in terminal? Cool way to trigger?

for bash, use aliases like so:

alias foobar="foo --with-option-bar -p -i -e "

in your .bashrc


[23:00:16]    dr_kludge | i want to invent an olfactory human-computer interface, integrate it into the web standards, then produce my own forked browser.
[23:00:32]    dr_kludge | can you guess what i'd call it?
[23:01:16]    dr_kludge | nosilla.
[23:01:32]    dr_kludge | i really should be going to bed.  i'm giggling madly about that.

Offline

#4 2009-01-18 05:37:03

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: Way to database and invoke command in terminal? Cool way to trigger?

intriquing.. thank you both..

so, I'm really liking my development over the past 6 months and now wish to have more 'at the ready' all the commands I use weekly.

So, I've thought may as well just put all the commands in a text file with a note above each one that tells me what it does... then I thought.. hmmm.. the cut and paste into terminal takes a while (after openbox, enlightenment and a few weeks of this and that I've gone GNOME again hehehe)

Thing is I'm looking for a way to access the commands and find out what they are... to explain... it's not just a matter of wishing to save time...

I actually don't KNOW what, for example mencoder command I want.. so, I would like to create or find the command I need, database it sorta,  and be able to trigger it into terminal in a clever way...

hmmmm.... I'm not really stating things that well. I'll read your posts and have a think I guess.... :---)


nice!

Last edited by yvonney (2009-01-18 05:38:11)

Offline

#5 2009-01-18 05:42:42

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: Way to database and invoke command in terminal? Cool way to trigger?

Acme looks like something interesting... or rather, something LIKE acme might be good.

I love text files... proprientary format scary.

So, i use bluefish, looked at jedit and use scite.

Acme runs as a virtual??? didn't get that.


got me thinking!

Would a programmers Shell make it a one click thing to trigger my tiny lines of code into a terminal?

I'm also really interested in being able to do this with html/css/javascript lines I have.

Maybe there's an elegant text-filey kinda program that will allow me to cover everything.
though they're different actions. One is pasting into terminal and the other is wishing to have lines of code easily buffered for pasting into other text files. maybe  jedit?

the programmer's shell sound interesting...
best solution??

Last edited by yvonney (2009-01-18 05:50:23)

Offline

#6 2009-01-18 08:36:12

u_no_hu
Member
Registered: 2008-06-15
Posts: 453

Re: Way to database and invoke command in terminal? Cool way to trigger?

hmm..
alias  mncd="mencoder -option blah blah blah"
or
function asdf()
           your snippet of code

Is this what you meant?

Or are you looking for text replacement while editing code?  like vi macros?


Don't be a HELP VAMPIRE. Please search before you ask.

Subscribe to The Arch Daily News.

Offline

#7 2009-01-18 09:04:37

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: Way to database and invoke command in terminal? Cool way to trigger?

thank you thank you!

um, I'm finding that I'm at the point where I have a LOT of bash commands and script bits in my head, in text files for referal, and in my terminal history...

I'm hoping to find a way to not only speed up the finding, cuting and pasting into terminal as WELL as databasing them so they can be called up as, well...snippets?

I'm thinking that your example was an abbreviation that when typed types the full line out.

What's happening to me, as pointed out is that there's becoming more and more commands that I need to access, slightly modify then save (currently to a text file)... trying stuff etc.

I'm wondering if some kind of IDE-ish, programmers shell would basically use text files though in a way that they could be organized in one spot and then perhaps grabbed and put into terminal (or wherever) for usage.

??

:---)

Offline

#8 2009-01-18 09:45:41

u_no_hu
Member
Registered: 2008-06-15
Posts: 453

Re: Way to database and invoke command in terminal? Cool way to trigger?

if alias and function doesnt work for you, can you give any example of the commands//snippets which you are trying to automate...


Don't be a HELP VAMPIRE. Please search before you ask.

Subscribe to The Arch Daily News.

Offline

#9 2009-01-18 10:01:57

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: Way to database and invoke command in terminal? Cool way to trigger?

UPDATE:  see studying already!!! more learning!

http://www.linux.org/docs/ldp/howto/Bas … /x246.html

--------------


u_no_hu !!!

Well, it's kinda random in a way.

Like today I was learing how to get alsa and jack and usb headphones, and and and and and

there's like 40 or 50 distinct lines that I've triggered in terminal a dozen or so of which, I'm still thinking about, wondering this and that about and would like to be able to have in some kind of record.

So, attempting to be cocise here, um, and being pretty poor at it today... hehehe

I'm going thru, what for me is a very big assention to becoming average.... :---)

geez, it's been incredible these past several months and what's starting to happen more and more is I've forgotten stuff, how I did this and how I did that...

So, I keep text files for very program of note.

So JACK has a list of notes and commands.
FFmpeg/recordmydesktop/blender/   WELL.... there's dozens of programs and I'm really into figuring stuff out like so many of us...

So.... really I am quite interested in studying the comments that have been kindly offered to me here today.
great interest in bash, how to use alas and function....SOUNDS GReat!!!

Right now I'm wondering IF I've missed some wonderful app that is a stepping stone to being really fast and efficint with terminal.... or just some novel text file based way of speeding things up AND having all my discoveries at my findertips quickly.....

dunno! though I WILL look into all this...

maybe just having a text file for every program IS a good approach and having the project with all the text files open in bluefish I guess...

there's no way to as yet remember every idiosyncratic thing I learn every day...

Last edited by yvonney (2009-01-18 10:04:33)

Offline

#10 2009-01-18 18:09:49

peets
Member
From: Montreal
Registered: 2007-01-11
Posts: 936
Website

Re: Way to database and invoke command in terminal? Cool way to trigger?

a text file, grep and cut can be a pretty quick solution: have a file with notes, and precede each line with keywords (what the line is about, e.g. mencoder, JACK, etc.). Then just grep for a particular keyword (and optionally cut it out for easier reading).

the synopsis in a manpage is often helpful; a lot of programs also have a brief --help option.

some text editors have support for snippets or macros or aliases. Some text editors can be used as a shell.

I think what you want is too vague or vast to be implemented in a structured database.

Offline

#11 2009-01-18 18:25:12

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: Way to database and invoke command in terminal? Cool way to trigger?

yes, peets... that kind of covers it.  reminds me of the wiki, keywords thing i know a bit about.

the text editor idea has me wanting to know what the top apps are.
I won't be able to manage vim or emacs this...um, year i don't think. I'm learning/changing so much with linux that might be too much to add.

Any other apps that use text files and are lightish I'm wondering? Wonder if bluefish or jedit or even scite will....thoguh I'm thinking SHELL ability.... so I don't know...yet!

the grep and cut .... I guess that could be used WITH an editor that allowed shell access?


Also, I don't quite get :

"Then just grep for a particular keyword (and optionally cut it out for easier reading)."


what would cutting it out for easier reading mean?




this has been a good posting for me..... THANKS everyone!!!!!!!

Last edited by yvonney (2009-01-18 18:33:14)

Offline

#12 2009-01-19 02:01:27

pauldonnelly
Member
Registered: 2006-06-19
Posts: 776

Re: Way to database and invoke command in terminal? Cool way to trigger?

yvonney wrote:

Acme looks like something interesting... or rather, something LIKE acme might be good.

Acme runs as a virtual??? didn't get that.

Acme isn't a normal shell, rather it's a text editor that lets you execute any text in it as a command, by selecting it with mouse button 2. I mentioned it because storing commonly used commands in a text file is exactly how Acme users often work. Other than that it may not be what you're looking for.

I'm not sure what you mean by "runs as a virtual".

Last edited by pauldonnelly (2009-01-19 02:02:29)

Offline

#13 2009-01-19 02:55:10

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: Way to database and invoke command in terminal? Cool way to trigger?

Great....

http://code.google.com/p/acme-sac/

they talk about virtualization

what's that about I wonder..

Hopefully there's another acme?

Not in aur at all I don't think....


is this acme??


sounds like I might be able to try it...

OR: are there any OTHER acme-like packages??


thank you!!!!!!!!!!

Offline

#14 2009-01-19 02:58:55

SamC
Member
From: Calgary
Registered: 2008-05-13
Posts: 611
Website

Re: Way to database and invoke command in terminal? Cool way to trigger?

Install plan9port, I think it has it.

Offline

#15 2009-01-19 03:18:06

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: Way to database and invoke command in terminal? Cool way to trigger?

Great.... installing now!

basically if there's a way to store intelligently bash commands (and code snippets?) and re-paste back to terminal (or html/css/javascript page?) in a way that's browsable/tagable? that would be great.

all very interesting!!!!!!!!

Last edited by yvonney (2009-01-19 04:01:57)

Offline

#16 2009-01-19 03:48:32

pointone
Wiki Admin
From: Waterloo, ON
Registered: 2008-02-21
Posts: 379

Re: Way to database and invoke command in terminal? Cool way to trigger?

Have you considered running a local wiki?


M*cr*s*ft: Who needs quality when you have marketing?

Offline

#17 2009-01-19 04:01:27

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: Way to database and invoke command in terminal? Cool way to trigger?

nice.... yes I used to run tiddly and was REALLY into WikidPad  though ...actually?  I got a bit nervous that stuff would go missing and basically decided that just text files in a project setting (currently bluefish projects) would do...

SO now I'm rapidly finding and firefox scrapbooking things, using them and then....well you know what happens .... the esssence / code kinda goes in your bash history or whatever it is, and then I have to use my arrow keys in terminal to find it and hope its the right one...

then there's all the css and html and mostly javascript I'm playing with.... more piles there archiving, text filing ...etc etc....

Ideally there'd be a way WITH text files to tag easily and yet not have to have the rambling wiki vibe..

Am I making any sense??

I GUESS I'm talking about an outline editor.... though I know.... that's so oldskool ....hehehehe

wiki's just eventually scared me out of them.... way easy to get it wrong and loose stuff?.... am I right at all??? hehehe


and I've just tried plan9 .... and I thought that perhaps it was up in the vim area which I could dedicate myself to right now.

I'm needing to simplify and the idea is to have the data accessible as I discover things..... bash scripts, everything really.... code snips, anything at all...


eeeek!

Last edited by yvonney (2009-01-19 04:02:52)

Offline

#18 2009-01-19 21:28:05

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: Way to database and invoke command in terminal? Cool way to trigger?

I seem to recall falling onto this page about a year or so ago: there's currently 8 pages of comments... I've found several of interest.

Yes, everything in one text file would be very cool... hate to loose it or accidentally delete stuff of course... that's the concern with wiki PROGRAMS.... something getting lost/deleted in the looseness of it all...  just a thought really. There's some amazing gurus out there...

http://www.43folders.com/2005/08/17/lif … -text-file

don't know if this link from the title of the above is the same sort of:

http://www.oreillynet.com/mac/blog/2005 … files.html


more thoughts on linux and text file organizing of EVERYTHING welcomed of course!!!!!


UPDATE: more links found in comments from above etc. some of which I also recall finding way back.... funny! :::

http://c2.com/cgi/wiki?ProgrammersNotebook
http://matthewcornell.org/blog/2005/08/ … -mans.html

Last edited by yvonney (2009-01-19 21:34:52)

Offline

#19 2009-01-19 22:08:21

pointone
Wiki Admin
From: Waterloo, ON
Registered: 2008-02-21
Posts: 379

Re: Way to database and invoke command in terminal? Cool way to trigger?

IMHO a well-structured wiki that, of course, is backed-up regularly is MUCH MUCH MUCH MUCH more 'secure' (for lack of a better word) than a text file. Plus, you get features like SEARCH, TAGGING, VERSION CONTROL, and all kinds of other goodness.

The more you ramble on about this, the more I want to scream "USE A GODDAMN WIKI!" wink

</opinion>

Last edited by pointone (2009-01-19 22:08:40)


M*cr*s*ft: Who needs quality when you have marketing?

Offline

#20 2009-01-19 23:22:48

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: Way to database and invoke command in terminal? Cool way to trigger?

yes, a wiki something might do it...

right now I have my old wikidpad pages saved as individual text files.

Well, rather than doing my thinking out loud thing here some more, what about a suggestion for a wiki or similar....

I am wishing to avoid another package with anything at all like a proprietary format etc.

LOTs of great things to think about ....thanks!

Last edited by yvonney (2009-01-19 23:41:39)

Offline

Board footer

Powered by FluxBB