« first day (1396 days earlier)      last day (3563 days later) » 
00:00 - 21:0021:00 - 00:00

12:31 AM
 
12:49 AM
Anyone think anything good will stem of this?
0
Q: What's the preferred method for offline updating

aGuyThere are quite a few offline update methods out there, e.g. apt-offline, apt-get, AptMedium, Keryx, etc. Is there any differences in terms of convenience, integrity, or security? Which one is preferred? Which one should be stayed away?

@Rinzwind askubuntu.com/questions/390769/… Any chance you could make your answer more comprehensive? Better hurry before @Luis adds a better one ;P
 
1:21 AM
@Seth software sources is not a thing anymore
the package was removed since the introduction of the USC
 
1:37 AM
It isn't a package it is the actual software sources. Note that is synonymized to it.
 
1:51 AM
@Seth the worse thing could ever happened... the apt tag already cover everything under /etc/apt/*
really, there are so many old crappy tags around for the most irrelevant things
 
@Braiam already covers everything under apt ;)
And I disagree with you.
\o @Nathan
 
@Seth and you don't care about tags, so, really, why I'm discussing with you
 
@Braiam yawns. You really gonna waste time strawmanning me?
 
@Seth look, I'm seriously involved in this topic, you already told me that this topic is not of your interests, so stay away of it, please, and let me improve the situation
 
2:01 AM
@Braiam Now you are doing it again. I never said the "topic was not of my interests", actually being a moderator makes it of my interest. Secondly, you are not making things better, you are making things worse and have been repeatedly asked and told to stop. Do you really want to make things even worse?
 
@Seth WORSE? You know how many tags are about apt? 16, 16 tags that have to be followed if you want to catch all the apt related issues
making a tag for each and every file and command related to apt is really, really, unhelpful
 
Who says all software sources questions are about apt?
 
@Seth /etc/apt/sources.list.d
is about configuring apt
sources.list questions are fine questions for the apt experts
no need to fragment more the topic
@Seth read the apt tag info page askubuntu.com/tags/apt/info
now, if it was about using the software sources gui tool, like it was in principle, I won't say anything
 
Whoa, whoa, slow down a little. Again, not all software sources questions are about apt. For example, this question has nothing to do with apt, just generating some sources.
@Braiam your wiki does not automatically "invalidate" other tags.
 
> Refering to editing the software sources in Ubuntu. Can be done graphically through System Settings > Software Sources or from the command line using APT.
"editing the software sources" which are what?
sources.list has never been "software sources" but "List of configured APT data sources"
 
2:09 AM
Good grief man. Those are your software sources. ahem.
You knew that.
 
behold! just to prove my point I searched for the first post with that tag
2
Q: How can I add an unlisted repository as my primary "Software Sources"?

Peter.OHow can I add an unlisted repository to my Software Sources via its (http/ftp)://... URL? I am not referring to a single entry in the /etc/apt/sources.list. The URL I am referring to points to a full-and-complete repository (security updates main restricted universe mutliverse). I know abou...

he's talking about "software sources" the gui tool
which is a fine usage of the tag
 
It's still a thing too, just under a different name.
 
@Seth look, if the tag was used to mean "for questions about using the graphical tool called software sources, provided by the software-properties" I would say, fine, that tag is ok
but right now, is stealing questions from the apt tag
 
I know you would. However, the tag has a greater meaning than that.
@Braiam That's just silly. If the question is about apt and the software sources, they should be using both tags. You are pretty much the only person I know who likes to tag questions with only one tag.
There will be miss-tagged questions. This is life.
 
@Seth the problem is that sources.list was never the same that "software sources"
software sources manipulates the sources.list, and that's the extend of it
if someone wants to use "software sources" to mean "sources.list" they are just doing it wrong
 
2:16 AM
"software sources" just means the sources of my software. It can mean the GUI for managing it, the sources.list file or even whatever yum uses to manage its sources.
It's really not that complicated.
2
 
@Seth wat?
I can't even imagine from where you got that conception
 
I'd say it is common knowledge. You've never heard of your.. umm... what do I call the sources of my software? Oh right, my software sources. Obviously, whoever synonymized the tags agreed with me.
I'm not sure there is a way to see who synonymized tags..
ah, there we go.
 
@Seth Incorrectly tagged questions are hard to find and answer. If you know of common, alternate spellings or phrasings for this tag, add them here so we can automatically correct them in the future. For example, suggest “bike” as a synonym for bicycle, or “sock” for socks.
 
@Braiam I know what the tooltip says.
 
software sources, the tool, is not a common, alternate spelling or phrasing of sources.list
 
2:20 AM
and I know what my opinion is, and I know what your opinion is.
and I know the opinions of the users who voted on the synonym.
What are we accomplishing?
If you want to change it, bring it up on meta.
 
Darn, I missed the start of the show, but hang on, I'm gonna make some popcorn... ;)
 
I hope it's over now @chaskes :)
(Looks like Braiam left the room so..)
In the meantime, want a pancake to go with that popcorn?
They don't really go together, but I'm making pancakes so..
 
Too many carbs for me :(
 
hm, if you could get rid of the kernels you might be on to something, top it with buttery syrup
 
(which is why I'm not actually eating popcorn either)
 
2:32 AM
@Mateo Hey, I hadn't thought of that!
That actually sounds kinda good...
@chaskes :(
 
I really like unity's locally integrated menus
 
@Seth I know, pancakes used to be my favorite food...
 
2:44 AM
0
Q: Make sources.list synonym of apt instead of software sources

BraiamOk, lets remember again why are using the synonyms: Incorrectly tagged questions are hard to find and answer. If you know of common, alternate spellings or phrasings for this tag, add them here so we can automatically correct them in the future. For example, suggest “bike” as a synonym for bi...

 
3:32 AM
Well that was awkward... my ashtray with filters burning just set my foam seat-cushion to smoldering, but I couldn't smell it over the filters... so I had no idea it was happening until the ashtray got so hot that it shattered. Cleans up and pours bottled water on his cushion.
 
3:46 AM
Reminds me of the time I started a fire with my first "introduction to electricity science kit" at the tender age of 8.
 
o0
Thats why smoking is harmful
 
4:26 AM
0
Q: Running shell script inside with vagrant provision

uiroshanI have setup a vagrant box using precise64 (ubuntu 14.04) and installed packages needed for octopress. I can ssh into the vagrant box and generate posts and run preview for my octopress site. Now I want to create a provision script to automatically run following commands once machine is up. ge...

 
That would have melted my igloo.
 
 
1 hour later…
5:45 AM
1
A: Automatically remove the patterns "tag :" and "tag -" from titles

Tim PostWe don't want to make the system any more confusing than it has to be. We should be simplifying it at this point, not adding additional complexity. That said, I think this could get us a net gain in quality if paired with some additional efforts on that front. Getting people to write good, desc...

BEHOLD, THY POWERESS OF THE BOUNTY
 
6:31 AM
Redis Sentinel is a really really neat application.
It monitors a cluster of Redis master/slaves and is able to promote one of the slaves to master if the network partitions.
 
6:43 AM
@JorgeCastro can you fix the issue you caused here proposing that synonym?
 
7:27 AM
Any python specialist here?
in Python on Stack Overflow Chat, 19 mins ago, by Avinash Raj
how to import a file and modify it's content through python?
 
posted on July 26, 2014 by user3625569

I got a dell laptop (dell inspiron 1420) with windows vista by default I wanted to install linux ubuntu on it I burned the iso file to a 16GB flash memory and I booted the laptop from it when I tried to install ubuntu on the hard disk an error appeared so I tried to boot another time when I couldn't boot in the second time I booted from the hard disk and entered wind

0
Q: How should I change root@mydomain when I send from mail() php function?

phpGeekI've installed sendmail in Ubuntu as below: apt-get install sendmail Then I sent an Email to test, I received Email from root <root@mydomain>. I checked the content of /etc/aliases, but it was empty. I've looked around but couldn't figure out how to change default user for mail sending. What...

 
with open(path, 'r') as f:
    content = f.read()

##here modfiying content

with open(path, 'w') as f:
    f.write(content)
@AvinashRaj
 
Thanks ...
how to merge your code with mine..
@Avinash_Raj Thank you! But this does not seem to import input.txt and then save the output like as in output.txt. How should it be edited for that purpose? — user3123767 41 mins ago
1
A: Output the rows with certain initial string of some specific column

Avinash RajYou could use python's re module for this, >>> import re >>> data = """A B aaaKP ... C D bbbZ ... E F cccLL""" >>> m = re.findall(r'^(?=\S+\s+\S+\s+(?:aaa|bbb)).*$', data, re.M) >>> for i in m: ... print i ... A B aaaKP C D bbbZ Positive lookahead is used to check whet...

What's the difference between open and with open?
 
ah yah, sorry, you need the with for as
edited that...
here's early morning - espresso still in stomach not in brain ;)
 
7:44 AM
lol
 
so data is what you read, m is what you write in your code above.
 
yep.
shifted posting answers from AU to SO. Result : got a silver regex tag badge.
 
lol
 
need 25 more days to get epic badge.
 
tag badges are hard to get on AU ;)
 
7:52 AM
yep. It's based on questions arriving rate.
 
4 h ago - that's a fresh one then ---> grats
 
:D
 
the ubuntu-one is dead :-)
time for some food gathering :=D
 
7:55 AM
I hold tag badges on such tags as
weirdest thing I even have a badge for but I keep away from all networking questions...
 
guys
anyone know how to learn C++ fast?
 
no way... it'll take you ages
 
uh really?
if compared with java , how much ?
 
not the command set but the coding without bugs.
@user44517 depends entirely on you, I guess. If you speak Java you may get on faster.
 
for clean code, i think it will be hard
so if i learn java in 1 year, how much year should i learn C++?
i talk comparison
oh ok it depends
 
8:00 AM
depends on what you code, really.
Go for C++!
 
yeah,that C++
 
<-- started with C ages ago but gave up
too little time.
 
:p
huh really?
why u gave up?
is there too many things to learn?
 
I am not a professional coder, so my time got eaten up with my job.
 
oh :D i see
so u must be techniciian ? or electronical engineer
 
8:02 AM
To actually learn a language it's the best to have a good project and stick to it for a while.
 
yep
i will try
thanks pal
gtg learn C++
 
\o/ it will reward you with freedom in coding and baldness from pulling hair out on debugging ;) /kidding
 
c++.... that's 10 years at least >:-D
ok I got my gathering tools so off to the store >;D
bbl
 
8:21 AM
0
Q: How to upgrade Ubuntu 13.10 (end of life) to Ubuntu 14.04?

RaviI've EOL release of Ubuntu 13.10. Now I want to upgrade to next release. For this I read many sites. So herein I would like to clarify & confirm ways for the same. 1) This site of ubuntu mentions how to upgrade from 8.10 to 9.04. It says to make sure the sources.list (/etc/apt/sources.list) has...

 
8:32 AM
The beauty of with open as is that you don't have to close it.
with open(some_file, 'r') as f:
    content = f.read()

or

f = open(some_file, 'r')
content = f.read()
f.close()
 
you don't? I always close files out of habit...
 
let me check, but i thought that was the whole point of with open as
 
<-- will clean up all his code if that was true.
 
It is good practice to use the with keyword when dealing with file objects. This has the advantage that the file is properly closed after its suite finishes, even if an exception is raised on the way. It is also much shorter than writing equivalent try-finally blocks:

>>>
>>> with open('workfile', 'r') as f:
... read_data = f.read()
>>> f.closed
True

https://docs.python.org/2/tutorial/inputoutput.html
 
coooool - Python FTW
2
<-- is going to edit the code above first thing
 
8:39 AM
now i just wonder if it magic-closes if you don't have a reference to it like:
content = open(some_file, 'r').read()
and it does.... python is magical
@Takkat even cooler ^^
 
9:05 AM
Magicians coded / code in Python.
 
success! gained 175xp in food gathering :=)
@hbdgaf not having to close does not mean you should not :=)
 
yes, that's why it's equal parts as above
@Rinzwind said xp - time for you to roll a d6 and see if you level up youtube.com/watch?v=54VJWHL2K3I
 
@Takkat Steve Irwin coded in python! he tried to code in fish but a stingray did not agree with his coding style
 
too soon bro... too soon
 
9:18 AM
and in the category: let's try a random instruction and see what happens:
1
Q: What happens if we add a dot at the nd of sudo `apt-get autoremove`

minisudo apt-get autoremove . OUTPUT: WARNING: The following essential packages will be removed. This should NOT be done unless you know exactly what you are doing! apt libapt-pkg4.12 (due to apt) libc6 (due to apt) libgcc1 (due to apt) libstdc++6 (due to apt) ubuntu-keyring (due to apt) gnupg (due...

:D
@hbdgaf still? :(
 
it's okay, the too soon was more for comedic value. for me it's never too soon though. i like standup comics that pull something really nasty then follow with "what? too soon?"
@Rinzwind why would you... wait why the **** would you...? smh
 
hey we gotta learn one way :P
if you got a nuke and want to know what happens if you launch it.... you need to launch it
 
this is true.
 
ok question... the release of 14.04.1 does that also imply the 12.04->14.04 upgrade path is available? or is the 14.04.1 just the ISO download?
 
the implication is there.
 
9:22 AM
ok
and BBL. Need my Fairy Tale fix :=)
 
in other news, why did i get a spanish lucy trailer on youtube as an ad?
 
9:38 AM
You Tube ads reveal what they know about us.
= nothing! :)
 
I was trying to find what triggered a spanish ad though... I have no idea what I did to make it think that was appropriate.
 
in case they know nothing they spit out random ads.
 
ah.... that is fair enough i suppose, but i was signed in as me.
 
10:06 AM
just a note, the queue being small gave me some inspiration to keep all my review tasks at zero. thanks again Luis
 
10:18 AM
o/ @terdon
 
10:37 AM
o/
 
 
3 hours later…
1:32 PM
0
Q: Vlan not connected to one network virtual machine to another network virtual machine

rajcoumarI created two ubuntu vm and I installed dhcp server on both the vm's. I configured the interfaces file and geting the ip address for vm1:10.192.1.2 and vm2:10.192.2.3 I have 24ports Switch. Now I want to create a common vlan id to both the vm's. I want to communicate this two vm's using same Vl...

 
Tim
1:43 PM
I asked this question on meta: meta.askubuntu.com/questions/10490/… would it be better if I asked it on the main site?
 
@Tim Not really, no:
8
Q: How do we feel about requests for learning materials?

terdonHow do we feel about requests for learning materials? Questions like "Where can I find a good tutorial on foo?" or "Is there a book for learning bar?" or "Can you suggest an online course on baz?" etc. I feel that such questions are not a good fit for the site because: They are not about a prob...

 
Tim
Even though it is completely for ubuntu?
Where would you recommend I redirect noobs...?
 
2:43 PM
@Tim ask it on discourse.
 
Yeah, I made it!
 
@Tim The Ubuntu Wiki presumably.
 
I finally fucking made it!
 
Internet and SSH into VM \o/
 
2:43 PM
But questions asking where I can find answers are off topic on all SE sites. We want to provide answers here, not a map of where you can find them elsewhere.
 
btw, hi :)
 
Hi Lucio
 
It has been a long time since the last time that I saw spam on the site
@luis @hbdgaf This is how the network looks like now: paste.ubuntu.com/7866146
and it works! :D
guys, if you didn't yet, update your system
the new firefox looks great
 
You mean Firefox 29?
 
can you show me the changes?
 
2:55 PM
Or did they make more recent changes?
 
@Seth 31
 
What's new?
 
There's a Google search bar in new tab.
yeah, that's about it
 
I wonder if they are still working on that 'home tab' thing.
 
@jokerdino sad for you :(
@Seth yep they are
 
3:00 PM
@Seth got a link to this new home tab concept?
@Lucio i see no much difference between v30 and v31 :P
 
@jokerdino I can find an old one.. I don't think there is any new news on it.
 
i heard no news of it. so any news is good news
 
Hi @terdon ....
 
Hi @AvinashRaj
 
sorry slow connc..
 
boy did i bite off a chunk for this weekend... bump xdot.py to pygi and figure out parsing the libmagic mlist from python, so i can dynamically list all possible return values from a call to libmagic
 
great
I'm going to see what dist-upgrade does ¬¬
 
@Seth interesting links. thank you
 
NP
 
@terdon What's the meaning of $_ in perl?
 
3:10 PM
Get the args?
As I remember it was used inside the function to get the passed variables
 
In powershell it refers to the current object in a pipeline
 
@AvinashRaj It depends on the context
 
@Lucio hi buddy, actually I can't update my system
 
morning luis
what happened?
 
in a while(<>) it is the current line, in a foreach (@array) it is the current element of the array. In general it is the current value of whatever it is you are looping through.
@AvinashRaj ^
 
3:16 PM
@lucio because i am having a...
 
oh
 
"Already using the latest" day.. you know, one of those days where you CAN'T update
 
@LuisAlvarado is it really eight cores or is it 4 cores with some optimizations that ubuntu sees as 8?
 
@AvinashRaj see here for more : perldoc.perl.org/perlvar.html#General-Variables
 
@terdon I'm not sure if that sounds good, or terrible.
 
3:17 PM
@hbdgaf let me put the image
 
@LuisAlvarado and tell me, how does it looks like the future?
 
Thanks..
 
@Seth Usually good actually. It can lead to horrible code when used too often but is great for one liners and is very often a boon.
 
@hbdgaf 32G ram-- must be 8 for me
 
@hbdgaf 4 cores + 4 threads in my case, but Ubuntu just calls it 8 cores.
 
3:18 PM
Thanks..
 
@Seth that's what i was asking...
 
Also, @Seth, it is (almost?) always optional. You can do while(<>) and there each line of your input file is automatically stored as $_ or you can write while($line=<>) and it is stored as $line. It's up to you.
 
Yeah, well I have the 2770 so I'm supposing it is the same.
@terdon that's good to know
 
@Lucio The testing is coming along nicely. Only about 3 bugs so far in my case
 
I never used it at first but now I can't live without it. You get used to it.
 
3:20 PM
I would love to have it on a mobile
 
Err, not 2270, but similar.
 
@hbdgaf There. I am pretty sure it is 4 cores
It might be showing only threads there
 
waiting for lscpu
 
cyrex@cyrex:~$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Thread(s) per core: 2
Core(s) per socket: 4
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 60
Stepping: 3
CPU MHz: 3248.195
BogoMIPS: 6795.48
Virtualization: VT-x
L1d cache: 32K
 
3:26 PM
yep
 
yep. have you tried out getting it to clock turbo mode or are you keeping it "sane"
 
@LuisAlvarado funny, 32G ram and only 125Mb of Swap xD
 
i like sane
@Lucio cause the more ram you have, the less swap you will actually need
 
i like making my hardware cry a little sometimes... i can see the other side of it though
guessing he doesn't use sleep/hibernate
 
Case in point, running 2 instances of handbrake, downloading with ktorrent, using chrome/firefox to create a site that was really badly coded and the swap is only saying 100kb
Actually I did use sleep
It works without me having swap so big
which goes against the normal thinking of having swap big for hibernation cases
 
3:30 PM
that's interesting. i'ld be careful about it just in case though.
 
Correct. I am also O.o about it since I also tell people the swap is needed for that
 
@AvinashRaj - did you read the part of the conversation between Takkat and myself on manipulating files with python?
If you didn't take a look around here:
7 hours ago, by Takkat
coooool - Python FTW
 
just when I was finishing downloading kali, a new version came up :(
 
@Lucio yeah, thought the same thing -.-
 
( ̄^ ̄)
there's a reason I just install the tools I need when I need them :)
 
3:35 PM
@hbdgaf Here is the output if you want to study how the hell the sleep works without swap
[51410.990709] PM: Syncing filesystems ... done.
[51411.006186] PM: Preparing system for mem sleep
[51411.006338] Freezing user space processes ... (elapsed 0.001 seconds) done.
[51411.008134] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[51411.009243] PM: Entering mem sleep
[51411.009448] Suspending console(s) (use no_console_suspend to debug)
[51411.009662] sd 2:0:0:0: [sdc] Synchronizing SCSI cache
[51411.009689] sd 1:0:0:0: [sdb] Synchronizing SCSI cache
[51411.009711] sd 0:0:0:0: [sda] Synchronizing SCSI cache
That's after I selected to go to suspend mode
When it turned on it landed right here on the chrome askubuntu chat
 
Are you sure you have more ram used than swap available?
If you're sure of that, then Ubuntu must have started using something like hiberfiles instead of just shoveling it all in to swap...
 
btw, the dist-upgrade thing worked. Now on 14.04.1
 
@Lucio excellent news
@hbdgaf yeah, I am guessing that is why the load indicator says 30GB of cache from the 32GB of ram
 
yep, nothing is broken, nothing need to be repaired :D
 
@Lucio The only issues right now with 14.10 are
1. Some weird dependency hell Fedora style between Nvidia, Wine and Handbrake
2. Theme not universal. Some places I see ambience, others I see the dark one (Not from once upon a time)
3. Shows weird hdd errors which is a fake bug but scare the hell out of me. Got too many movies in the HDD that is "failing"
Thats about it, virtualbox working, steam working, xbmc working, even a drawing board i am using with inkscape is working.
 
3:46 PM
@LuisAlvarado hah... the movie bit made me giggle a little
 
@hbdgaf One quick question, are hibernation and suspend the same? I think hibernation actually goes to a deep sleep state, whereas suspend sends everything to memory, so that might be the reason why it works.
 
@LuisAlvarado hey are different... yes
it's odd, because depending on what OS/area you're talking about there's "suspend, suspend to disk, hibernate" etc etc
 
how about we kill the people that created all of that and just set it to "suspend to disk, suspend to memory"
 
i'm with you buddy. but not everyone has the clarity and do one thing right mindset microsoft cough
relatively pleased that i think i found the code section to get the "possible file id types" blob out
$ grep -r 'mlist' . | grep -v apprentice | grep -v .sh
./src/softmagic.c: struct mlist *ml;
./src/softmagic.c: for (ml = ms->mlist[0]->next; ml != ms->mlist[0]; ml = ml->next)
./src/softmagic.c: struct mlist ml;
./src/file.h:struct mlist {
./src/file.h: struct mlist *next, *prev;
./src/file.h: struct mlist *mlist[MAGIC_SETS]; /* list of regular entries */
./src/file.h:protected int file_magicfind(struct magic_set *, const char *, struct mlist *);
I'm trying to squash this bug/feature myself github.com/ahupp/python-magic/issues/65
 
hey cool
 
3:55 PM
yeah, i think it would be an awesome addition to the library
 
@hbdgaf somebody posted on the git chat you linked
 
:)
 
@LuisAlvarado they are pretty small, good
play guitar in winter is.. hard
gotta eat something, later!
 
later
 
4:17 PM
14
Q: Announcement: Keyboard shortcuts are now integrated into the site

balphaOriginally we have implemented the keyboard shortcuts as a user script. We have now finally made the change to have them integrated into the site. When you go to the "preferences" page on your profile, you'll find a new checkbox labeled "Enable keyboard shortcuts". Click it, and from there on, e...

 
5:09 PM
Err, why is samba running on my machine? o_O
 
@Seth you installed it
 
apparently
 
5:28 PM
upstart is a pain to disable services, in systemd I would have told you to just sudo systemctl disable smb.services nmb.services
 
5:42 PM
@Braiam you know what's even worse? i have to separately enable it for both main and meta sites.
 
@jokerdino [status-planed
 
great. i wasn't the only one.
yo hablo un poco español!
 
@jokerdino yo hablo un poco de español
 
de = of?
 
yup
 
5:47 PM
i speak a little of spanish / I speak a little spanish.
Cool, thanks!
i know like some 40 words
 
spanish is more verbose than english, and have many more words
 
i like to hit the 2k mark.
 
just start using it in daily basis
most people doesn't notice I'm not a native english speaker, but that's because I use it regularly
 
true that
 
@psusi according to this mount dropped support for fstab.d, is that information still relevant?
 
6:14 PM
found it. the function i needed to model after was apprentice_list() \o/
 
\o/
 
6:31 PM
@hbdgaf funny name...
 
it's a function in the file utility to list out match names by walking the mlist and looking for descriptions. related to a feature-request bug i opened against python-magic.
 
7:07 PM
0
Q: How root can make sure that this time sudo will not prompt for password a specific user?

Adam RyczkowskiI am writing a script, that will setup lxc on the host, and then configure a container. I want this script to be unattended. After the container is created and run, there is a moment, when I want to log in as the user and perform some commands with sudo. I know how to setup ssh to let me login wi...

 
7:56 PM
@badp Is there an equivalent of !! in fish?
 
@LuisAlvarado - any thoughts on the gist since you might use the output-ed constants in libmagic? gist.github.com/aking1012/6ea2ab332a5785c26253
 
@Seth what does that do?
I don't think ! is a feature in LyX. Just up-enter to re-run the previous command.
 
!! stores the last command in bash.
I use it regularly when I forget to run things with sudo. Just sudo !! to rerun the last command with sudo.
 
oh then "sudo " then up-arrow
er
well then something like this should work
function sudo!!
  sudo (history | head -n 1)
end
 
hm, yeah I suppose that would.
 
8:07 PM
Of course that only works once
whereas bash lets you repeat !! over and over
you could work around that by setting the previous command in a variable; if your previous command was "sudo!!" then run what you memorized instead.
 
Kind of complicated for a simple thing :/
 
function sudo!!
  set -l __sudorepeat_cur (history | head -n 1)
  if [ ! -e "sudo!!" $__sudorepeat_cur ]
    set -u $__sudorepeat_prev $__sudorepeat_cur
  end
  sudo $__sudorepeat_cur
end
I haven't tried it but this sounds about right
(assuming set -l is the way to make function-local vars and set -u is the way to make universal variables that sync between terminals and persist between sessions)
If nothing else something that's kind of complicated is much easier to hack together when the syntax isn't a convoluted piece of shit :P
as for just repeating the previous comment that's kind of harder, as (history | head -n 1) is not legal for some reason
 
thanks @badp. I'll try some of that later.
 
@Seth btw it seems that "!!" is a valid function name in fish
function !
  echo (history | grep ".*$argv" | head -n 1)
end
function !!
  fish -c (! $argv)
end
worst case scenario
grep is the worst for complaining about empty patterns
 
8:27 PM
@hbdgaf no question yet. Did a brief check and it has, well everything I need. Will let you know when I am missing something
Great job
 
The only problem with that is running !! then !! :P
 
00:00 - 21:0021:00 - 00:00

« first day (1396 days earlier)      last day (3563 days later) »