[{"data":1,"prerenderedAt":307},["ShallowReactive",2],{"project-4369485":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":29,"sentiment":30,"stance_mix":31,"scored_comments":36,"aspects":37,"strip":46,"post_text":47,"what":48,"said":77,"maker_in_thread":153,"shape":162,"grid":166,"attempts":270,"same_week":271,"maker_shows":39,"maker_hidden":299,"reader_version":300,"card":301},"4369485","bashrc_dispatch","A fix for the .bash_profile .bashrc .profile madness","title","Show HN: A fix for the .bash_profile .bashrc .profile madness","https:\u002F\u002Fgist.github.com\u002F3320963","gist.github.com","jwecker",1344660932,2012,173,42,102,1677,7,"notable","dev_tools","shell configuration","library",[24,25,26,27,28],"bash","bashrc","bash_profile","shell startup","dotfiles","debated",0.146,{"positive":32,"neutral":33,"mixed":34,"critical":35},5,6,0,4,15,{"execution":38,"performance":40,"idea":41,"docs":44,"design":45},{"positive":39,"critical":34},1,{"positive":39,"critical":34},{"positive":42,"critical":43},2,3,{"positive":39,"critical":34},{"positive":34,"critical":39},[34,34,34,34,34,34,43,43,34,34,34,34,34,32,34,32,34,34,34,39,34,34,34,32,34,39,32,34,39,43,39,34,34,34,32,34,43,34,43,43],null,{"problem":49,"audience":59,"pricing":47,"motivation":68,"time_to_build":47,"stack":73,"openness":74,"stage":75,"team_size":76},{"value":50,"source":51,"evidence":52},"Bash startup files (.bashrc, .bash_profile, .profile) behave inconsistently across platforms and are confusing to configure","maker",[53,56],{"id":54,"by":11,"text":55},"4369732","So I admit it's a 10 minute hack done on my way home on the train, but the issue is real even if you understand the man page. Here's roughly the way these work normally. Starting…",{"id":57,"by":11,"text":58},"4369789","Kind of... That's pretty much what mine had evolved into, a bunch of them sourcing each other and making sure they weren't recursively sourced for when they're used on a…",{"value":60,"source":61,"evidence":62},"Developers who maintain shell dotfiles across Linux and OS X","inferred",[63,64],{"id":54,"by":11,"text":55},{"id":65,"by":66,"text":67},"4369589","ghshephard","If I do a survey of 10 engineers who use Linux, and OS X every day - I'm willing to wager that 9\u002F10 of them wouldn't be able to explain what should be in .bash_profile, .profile,…",{"value":69,"source":51,"evidence":70},"Maker was merging dotfiles from OS X and Linux and was tired of the startup file ambiguity",[71,72],{"id":54,"by":11,"text":55},{"id":57,"by":11,"text":58},[],"open_source","beta","unknown",{"praise":78,"objections":99,"requests":114,"questions":123,"alternatives":131},[79,95],{"value":80,"source":81,"evidence":82},"Clean, shareable solution to a confusing problem","commenter",[83,87,91],{"id":84,"by":85,"text":86},"4369864","gioele","I forked this file into a proper repo [1] and made some adjustments. Now the script does not spawn external processes any longer, making the shell lighter and faster to came up.…",{"id":88,"by":89,"text":90},"4369878","bajsejohannes","This is great! I made a little tweak where you can change the locations of the scripts: https:\u002F\u002Fgist.github.com\u002F3323840 I set PREFIX to ~\u002FDropbox\u002Frcfiles\u002F, and the scripts will…",{"id":92,"by":93,"text":94},"4370274","benatkin","Looks awesome! Please use a github project (also called a repository) for this sort of thing rather than a gist. There isn't a minimum size for a github project's codebase and…",{"value":96,"source":81,"evidence":97},"Faster shell startup after removing external process spawns",[98],{"id":84,"by":85,"text":86},[100,110],{"value":101,"source":81,"evidence":102},"Solution to a problem many engineers do not feel exists",[103,107],{"id":104,"by":105,"text":106},"4369578","smegel","Solution looking for a problem. Not a particularly good one at that.",{"id":108,"by":105,"text":109},"4369642","I think most engineers can hack their way to .bashrc even if they don't know the exact differences between those files. And those that can't probably don't need to or can get…",{"value":111,"source":81,"evidence":112},"Breaks the standard bash dotfile convention and relies on symlinks",[113],{"id":108,"by":105,"text":109},[115,119],{"value":116,"source":81,"evidence":117},"Move the project to a GitHub repository",[118],{"id":92,"by":93,"text":94},{"value":120,"source":81,"evidence":121},"Make the script location configurable",[122],{"id":88,"by":89,"text":90},[124],{"value":125,"source":81,"evidence":126},"Why bash distinguishes login and interactive shells at all",[127],{"id":128,"by":129,"text":130},"4370030","delinka","Why did someone even decide that the program (the shell executable) needed to behave differently depending on \"login\" vs. \"interactive\"? If I'm executing a remote command (e.g.…",[132,142],{"value":133,"source":81,"evidence":134},"Spreading logic across the standard bash dotfiles with a guard",[135,138],{"id":136,"by":105,"text":137},"4369767","Could you achieve the same outcome by spreading the logic though the three standard bash dotfiles? Standard names plus no symlinks, i could live with that.",{"id":139,"by":140,"text":141},"4369914","drothlis","``` > 'interactive' is when called with -i flag (which sshd does when reached by > ssh with no command passed, i.e if you do 'ssh ls' it should not call > bashrc, but should call…",{"value":143,"source":81,"evidence":144},"Switching to zsh or another shell",[145,149],{"id":146,"by":147,"text":148},"4369633","james2vegas","bash is the problem, the solution to this madness is to not use bash.",{"id":150,"by":151,"text":152},"4369694","masklinn","Don't other shells have similar issues? ZSH sources .zshenv, .zprofile, .zshrc and .zlogin (and corresponding \u002Fetc files) depending on the exact situation. Only difference is…",{"comments":35,"answered":39,"key":154},[155,158,161],{"id":156,"text":157},"4370581","Good call. Merged into the repo https:\u002F\u002Fgithub.com\u002Fjosephwecker\u002Fbashrc_dispatch . Thanks!",{"id":159,"text":160},"4370591","Indeed. https:\u002F\u002Fgithub.com\u002Fjosephwecker\u002Fbashrc_dispatch - thanks to gioele for already doing some cleanups and speedups.",{"id":54,"text":55},{"commenters":163,"max_depth":32,"maker_replies":35,"first_comment_mins":164,"lifespan_hours":165},29,83,58,[167,170,174,175,177,179,183,187,190,191,194,198,201,203,205,208,210,212,214,217,220,222,223,225,227,229,230,232,234,237,239,242,245,248,251,254,257,259,263,265,266,267],[168,34,34,169,140,34],"4369751","other\u002Fneutral\u002Fdocs",[171,34,34,172,173,34],"4369840","commenter\u002Fneutral\u002Fdocs","lloeki",[139,34,34,172,140,34],[176,34,34,172,173,34],"4370251",[178,34,34,172,140,34],"4372272",[180,34,34,181,182,34],"4370277","other\u002Fneutral\u002Fnone","RHSeeger",[184,34,43,185,186,34],"4371832","project\u002Fneutral\u002Fexecution","jasomill",[188,34,43,185,189,34],"4371182","slurgfest",[128,39,34,181,129,34],[192,39,34,181,193,34],"4370126","gecko",[195,39,34,196,197,34],"4370127","commenter\u002Fneutral\u002Fnone","npsimons",[199,39,34,181,200,34],"4370131","pyre",[202,39,34,181,129,34],"4370436",[84,42,32,204,85,34],"project\u002Fpositive\u002Fperformance",[206,43,34,181,207,34],"4369932","ColinWright",[88,35,32,209,89,34],"project\u002Fpositive\u002Fexecution",[156,35,34,211,11,39],"maker\u002Fpositive\u002Fnone",[213,32,34,181,200,34],"4370288",[215,32,34,181,216,34],"4370454","sciurus",[218,32,34,181,219,34],"4371087","graywh",[146,33,39,221,147,34],"project\u002Fcritical\u002Fidea",[150,33,34,196,151,34],[224,33,34,172,200,34],"4370281",[226,33,34,196,151,34],"4370362",[92,18,32,228,93,34],"maker\u002Fpositive\u002Fdocs",[159,18,34,211,11,39],[104,231,39,221,105,34],8,[65,231,32,233,66,34],"project\u002Fpositive\u002Fidea",[235,231,34,196,236,34],"4369616","digisign",[108,231,39,238,105,34],"project\u002Fcritical\u002Fdesign",[240,231,43,185,241,34],"4369866","cswetenham",[243,231,39,221,244,34],"4369672","nodata",[246,231,34,196,247,34],"4369687","azylman",[249,231,34,169,250,34],"4369737","slyall",[252,231,34,172,253,34],"4369803","reidrac",[255,231,32,233,256,34],"4369985","moe",[258,231,34,172,244,34],"4376059",[260,231,43,261,262,34],"4369693","project\u002Fneutral\u002Fidea","forgotusername",[54,231,34,264,11,39],"maker\u002Fneutral\u002Fidea",[136,231,43,261,105,34],[57,231,34,261,11,39],[268,231,43,185,269,34],"4370657","ed",[],[272,277,281,285,290,294],{"id":273,"name":274,"points":275,"category":276},"4368877","Eligible API",218,"web_saas",{"id":278,"name":279,"points":280,"category":276},"4366002","The KickBack Machine",187,{"id":282,"name":283,"points":284,"category":20},"4376184","coderwall.com",165,{"id":286,"name":287,"points":288,"category":289},"4365601","Tweetsheets",160,"productivity",{"id":291,"name":292,"points":293,"category":20},"4377730","Ymacs",125,{"id":295,"name":296,"points":297,"category":298},"4362355","Choose Photo",116,"creative",false,"v2",{"id":302,"name":5,"line":6,"ai":299,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":303,"top":18,"kw":304,"maker":11,"domain":10,"tier":19,"attempts":34,"strip":305,"url":9,"mix":306,"praise":80,"objection":101,"sub":21},4369485,0.15,[24,25,26,27,28],"0000003300000505000100050150131000503033",[32,33,34,35],1793990884096]