Commit graph

145 commits

Author SHA1 Message Date
axel
2e5821c17d Do not change status when the 'exit' builtin is called with no argument
darcs-hash:20060612165137-ac50b-0281941e35c5f8b619460f67d24a89caec475815.gz
2006-06-13 02:51:37 +10:00
axel
f46145a6b3 Do not change status when the 'return' builtin is called with no argument
darcs-hash:20060612164854-ac50b-5f428c819e8dafb44b591150d1965c5158854781.gz
2006-06-13 02:48:54 +10:00
axel
d32751df13 Use halloc in a few more places, including the highlight code
darcs-hash:20060612141233-ac50b-1c44411dd31cdc31d6ccb226f567c308c4fc0f55.gz
2006-06-13 00:12:33 +10:00
axel
af8cb6fe87 Minor code edits - add a few braces, a few minor safety checks, etc.
darcs-hash:20060608235719-ac50b-bec405da5ae101ff50bb3390bb83ef8b0948e4e9.gz
2006-06-09 09:57:19 +10:00
axel
5855f78010 Edits to source code comments
darcs-hash:20060608235557-ac50b-052e5c8f2cceb554064d7408573f277275903e7b.gz
2006-06-09 09:55:57 +10:00
axel
f7118e769f Add more function input validation checks
darcs-hash:20060608235212-ac50b-25fd55f96356af65d4da1eec100cc954b4a9f81e.gz
2006-06-09 09:52:12 +10:00
axel
446272eee6 Minor code tweaks, including making sure builtins are not run if an io redirection issue occurs and removing a lot commented debug code
darcs-hash:20060603223533-ac50b-204ff1fb1a4912565044e7bc4b86102a7eeba192.gz
2006-06-04 08:35:33 +10:00
axel
48ca253097 Minor spelling fixes
darcs-hash:20060603223228-ac50b-b4f7b190baf3c41bf23c224f5d68e8888dd4eaed.gz
2006-06-04 08:32:28 +10:00
axel
6fada015b6 Drop validation of function code on new function definition - the code has already been validated
darcs-hash:20060602021757-ac50b-02bad63baf4826801ec0433468ec78d9b4a4c0f7.gz
2006-06-02 12:17:57 +10:00
axel
a1a2773cbf Make sure code validation error output for e.g. the complete builtin can be redirected, and that it has the prefix 'complete', not 'fish'
darcs-hash:20060602021517-ac50b-5e566aefbd1c9bcb3a5f11f9fc1125d8c1d9e936.gz
2006-06-02 12:15:17 +10:00
axel
d6bf879675 Move jobs builtin to its own file
darcs-hash:20060526113811-ac50b-9c0ed1aa26cd2f247978e406bea86e8c36d73710.gz
2006-05-26 21:38:11 +10:00
axel
17171c3277 If a help page for a builtin is showed in response to an error, make sure it fits on screen, or only print the synopsis - this patch also contains a huge number of tweaks to where and when the help pages are printed
darcs-hash:20060526112402-ac50b-88993e45f411b2f1c45b3202c393c5328f1c7429.gz
2006-05-26 21:24:02 +10:00
axel
b746a803a9 Add validator check to make sure the second argument to 'for' is 'in'
darcs-hash:20060521221604-ac50b-5bc4ce217a08304f68b97b20e908ea1279fe26e9.gz
2006-05-22 08:16:04 +10:00
axel
dbb66e1895 Remove two minor memory leaks
darcs-hash:20060514223903-ac50b-4e764c460effd8c45493acfe5682626c3711c77e.gz
2006-05-15 08:39:03 +10:00
axel
5a7a264b96 Fix bug that caused block level io redirection to break on while loops
darcs-hash:20060514222905-ac50b-7dec0ed716f5fe6af9069b597eee464829a8d820.gz
2006-05-15 08:29:05 +10:00
axel
9ebdc16be6 Fix the longstanding hang-on-exit bug in eterm, as well as making sure the history is saved when the terminal emulator exits
darcs-hash:20060514101623-ac50b-f8ce693ec111e3c158640ef8de309bf7e5484c5b.gz
2006-05-14 20:16:23 +10:00
axel
92ecc01baa Fix broken method for sorting output of builtin commands 'functions', 'set' and others
darcs-hash:20060514094721-ac50b-9f1d8b6a2e8b4438e6a655de61af54d15cd4f537.gz
2006-05-14 19:47:21 +10:00
axel
445f6539cf Fix two bugs in the jobs builtin, causing freezes and other incorrect behaviours
darcs-hash:20060424153434-ac50b-2434329395cbd4a258d6fb9f15e166065b2eb164.gz
2006-04-25 01:34:34 +10:00
axel
de2405b35a Add more descriptive error messages when trying to use variables in command names
darcs-hash:20060421142939-ac50b-d1809fa4687706b433d1d0a5e0a0c9d791de510f.gz
2006-04-22 00:29:39 +10:00
axel
76bafbef2a Make the read builtin accept 0 parameters and drop the input instead of showing an error message
darcs-hash:20060419100830-ac50b-50f96925481bb29ad840fb12240ef9b9b86d18c4.gz
2006-04-19 20:08:30 +10:00
axel
0de232bf54 Do not return to the shell until all processes of a job have finished (Previous behaviour was to return once the last job had exited, and could cause e.g. the jobs builtin to print out the job responsible for repainting the titlebar). Also validate that jobs have not completed in various places where the job list is examined
darcs-hash:20060404112722-ac50b-4b6a55ce7c57d39213cdd0ed0f581795a72859b7.gz
2006-04-04 21:27:22 +10:00
axel
13a51ba4c2 Fix warnings from ICC
darcs-hash:20060329001450-ac50b-9c3fe4f7ca14a077997c421616c07dde03b48c6d.gz
2006-03-29 10:14:50 +10:00
axel
dd8150d98d Minor comment and documentation changes
darcs-hash:20060314000914-ac50b-63c49a59804f51c4dd19de574db41298b1ef67c5.gz
2006-03-14 10:09:14 +10:00
axel
0d56818664 Fix bad return status in read builtin
darcs-hash:20060310195100-ac50b-2b7d94510661d901fd804074e6cf03e926dddc79.gz
2006-03-11 05:51:00 +10:00
axel
32b531667a Fix bug that causing terminal corruption if a job is put under job control before running in interactive mode. This is fixed by doing more inits at startup (but only slightly more)
darcs-hash:20060310133809-ac50b-d31cd7bab1a3a58de2833f73735817a3d0b3ed7d.gz
2006-03-10 23:38:09 +10:00
axel
2401a163fe Move all fallbacks for standard and not-so-standard unix functions to fallback.c, in order to have a one-stop place to look for such functions
darcs-hash:20060228131716-ac50b-0832193dbcaf7191dcb24456dc40f2e861a1382e.gz
2006-02-28 23:17:16 +10:00
axel
43ab84397b Make sure that command specific completions can handle input strings with wildcards reasonably well
darcs-hash:20060219011432-ac50b-89a73a3d414f2dbd8a213b851fcb1c494e022eae.gz
2006-02-19 11:14:32 +10:00
axel
0840c9248f Give more detail in an error message
darcs-hash:20060218024346-ac50b-f26f6ef107fffa398b6ff61baff81914b998940a.gz
2006-02-18 12:43:46 +10:00
axel
143602e5f6 Minor edits
darcs-hash:20060215024900-ac50b-51863879c32660d9787db706c34fef10aa4c30c2.gz
2006-02-15 12:49:00 +10:00
axel
c94b9e504d Remove the rather stupid -y option for complete, which loads another commands completions. Mostly the same results can be had with fewer bugs and corner cases vy using the new dynamically loaded functions.
darcs-hash:20060215022228-ac50b-85614ed684f73460d43543a579ff2c7e7914efeb.gz
2006-02-15 12:22:28 +10:00
axel
8be3bf3e5d Add support for checking current filename and current line nuber to status builtin
darcs-hash:20060214195747-ac50b-77b6aba42c99da4f79ea500c47cc00bba12ec663.gz
2006-02-15 05:57:47 +10:00
axel
3e165297ce Add support for sending arguments whenusing the source builtin
darcs-hash:20060214195636-ac50b-511c211368103df6923d63cef99ce20a88d31be3.gz
2006-02-15 05:56:36 +10:00
axel
20c83ba605 Optimize the halloc implementation so that mutiple calls to halloc can be satisfied by a single malloc, also add wcsdup and wcsndup workalikes using halloc
darcs-hash:20060211001317-ac50b-c9cf234c334b4d697fe1251c21013c8ec7f7b0a1.gz
2006-02-11 10:13:17 +10:00
axel
d1c9bca2e9 Another halloc:ification of fish. Halloc has been extended to allow registering function calls, this has allowed the creation of halloc-handled arraylists, stringbuffers, etc. More job parsing halloc-ification has reduced the error handling code to only a shadow of it's former self
darcs-hash:20060209155020-ac50b-e119c5293ce2368e252cfc01b98ab7c629fdd678.gz
2006-02-10 01:50:20 +10:00
axel
57d53c70e3 Further halloc:ification if fish
darcs-hash:20060206181101-ac50b-db0aac307a81e7f0677acd15a9f38ff8c7ff36d2.gz
2006-02-07 04:11:01 +10:00
axel
6291be256b Second checkin of halloc changeover. Make the argv array, but not it's contents, be allocated using halloc. Also make list_to_char_arr use halloc
darcs-hash:20060206151817-ac50b-e8fd4cff831ee975c5bf3855d9ecfc15a3fb9215.gz
2006-02-07 01:18:17 +10:00
axel
e756f7d619 Minor code cleanup, don't use expand_escape and expand_unescape any more
darcs-hash:20060206151552-ac50b-e2229d096926461f643fdcdfc79ef1ff01344a35.gz
2006-02-07 01:15:52 +10:00
axel
749c44fe27 Minor edits of builtin.c, some reindentation and code comment improvement
darcs-hash:20060205212050-ac50b-70c1b34208b442b5670fde2c6655e09c4480c7e7.gz
2006-02-06 07:20:50 +10:00
axel
a53a9aa293 Clean up init code in builtin.c
darcs-hash:20060205130840-ac50b-1a2b29671b7d8c557ebd284513c535e082ee5cf3.gz
2006-02-05 23:08:40 +10:00
axel
1401c44a79 Don't print full stack trace for failiures in cd in interactive mode
darcs-hash:20060204113650-ac50b-465dd4b3fb27e8d90127231cccdae29ac7b8fd20.gz
2006-02-04 21:36:50 +10:00
axel
06fd1aa9f8 Make stack traces print absolute filenames
darcs-hash:20060202152356-ac50b-9e6ab31c03d5f49824ccca7eee3b8e62d66b0009.gz
2006-02-03 01:23:56 +10:00
axel
feabc032f6 Generalize the stack tracing code, add support for showing events and command substitutions in stack traces
darcs-hash:20060201154911-ac50b-707358ea50231661c05a92b40ca109ec801081e6.gz
2006-02-02 01:49:11 +10:00
axel
028e1f36a1 Improve the status builtin
darcs-hash:20060130195310-ac50b-5da6881a847170242be56555646bbf037218d545.gz
2006-01-31 05:53:10 +10:00
axel
f59e9baab9 Rename the 'terminal' flag to 'job_control', make sure fg and bg only considers jobs under job control and make it configurable which jobs are put under job control using the status builtin. Also add an option to the status builtin to print a stack trace.
darcs-hash:20060130175426-ac50b-46fb79797284cb600c67cb19462b53761446f00a.gz
2006-01-31 03:54:26 +10:00
axel
521d09b6d0 Add support for calculating completions for arbitrary commands through the 'complete' builtin
darcs-hash:20060130165150-ac50b-5e2ef3bb0298dd5e1a5d6fbdade314cc73ef36f3.gz
2006-01-31 02:51:50 +10:00
axel
003c4d776f Display use of . (source) builtin in stack traces
darcs-hash:20060128113440-ac50b-6556097eb766cc7561a3d30ef994bc913181fe65.gz
2006-01-28 21:34:40 +10:00
axel
18d06cf10f Smaller edits
darcs-hash:20060124181410-ac50b-4ec9e2990852a678de7d47a565ed41780b5279fc.gz
2006-01-25 04:14:10 +10:00
axel
e0d6b5c438 Add manual page for fish_pager command
darcs-hash:20060124180729-ac50b-ee2811e3a96d7f29f372ea5a5b1d08ff9045545a.gz
2006-01-25 04:07:29 +10:00
axel
8df21a1cb1 Minor edits, mostly tweaks of the API documentation
darcs-hash:20060123233347-ac50b-44ebb96ba202c062739ba3d183519e28a95511b2.gz
2006-01-24 09:33:47 +10:00
axel
29c488c6dc Fixes to api documentation, added .PHONY to makefile actions, made a few private functions static
darcs-hash:20060123204014-ac50b-b9d2a10c7f00945b5d9d244cb3b8c1489fe280de.gz
2006-01-24 06:40:14 +10:00
axel
0dadd83fdd Move the complete builtin to it's own file, and make it accept multiple -c, -p, -s, -o and -l switches
darcs-hash:20060122211055-ac50b-6ef8cff7fb02e974d6a8096bf83bcbed429d7322.gz
2006-01-23 07:10:55 +10:00
axel
d2c12e760c Fix crash bugs in fg and bg builtins, and make sure bg doesn't consider background jobs when run without an argument
darcs-hash:20060119131515-ac50b-d080ffde013419e2a461cf860b4858b88404ff33.gz
2006-01-19 23:15:15 +10:00
axel
1e7dd4f928 Check location of term.h header (updated)
darcs-hash:20060119122207-ac50b-c573f54cbe13a1592a20342ee331159be0306913.gz
2006-01-19 22:22:07 +10:00
axel
13e94c0617 Don't print error message in fg if the command didn't fail
darcs-hash:20060118164750-ac50b-af59573292b32b87d0257c501eb7989062503653.gz
2006-01-19 02:47:50 +10:00
axel
9501dc83e6 Make the functions builtin display function listing on -n to a terminal in a human-friendly format
darcs-hash:20060115115805-ac50b-fc5b468c0e68904e5cf934f43066ecfdf23e2a3b.gz
2006-01-15 21:58:05 +10:00
axel
1562b8148d Make sure functions as printed by the fyunctions builtin don't have any stray empty lines
darcs-hash:20060114015801-ac50b-135fb66cf74a9cd51f6d52e2eff12c55042e4183.gz
2006-01-14 11:58:01 +10:00
axel
d4034fc253 Yet another batch of description tweaks, as well as the last major checkin of translations to swedish (updated patch)
darcs-hash:20060111141735-ac50b-b6a9ac5d5d9eb8eac28dd39968cd28f99044e8f5.gz
2006-01-12 00:17:35 +10:00
axel
032a736840 Make the read builtin able to create universal variables
darcs-hash:20060111122640-ac50b-4b411b9822a44ae105b71ca51ee47d0aa13a1a62.gz
2006-01-11 22:26:40 +10:00
axel
690648e1b0 Huge upade containing several bugfixes related to i18n, and a huge number of new translatable strings, including almost all description messages for command specific completions
darcs-hash:20060108025656-ac50b-e2309829a0afa6b3270d13814e9600d0fd372407.gz
2006-01-08 12:56:56 +10:00
axel
f6b2b9f9a5 Change syntax of 'and' and 'or' to infix order
darcs-hash:20060105153753-ac50b-4413a5d2652232bb38c97f5c673251193fc848ec.gz
2006-01-06 01:37:53 +10:00
axel
48030576e4 Improved description for the commandline builtin
darcs-hash:20060104141541-ac50b-b5e427b8d9767f016ea62a898ebd06c5cf48066c.gz
2006-01-05 00:15:41 +10:00
axel
ec43c635cc Add i18n through gettext, as well as a Swedish translation
darcs-hash:20060104125102-ac50b-5bf026578a69bd94f7a7a3c8dee0ebccd95e5c24.gz
2006-01-04 22:51:02 +10:00
axel
443ddb509e make the functions builtin output descriptions and event handlers for functions
darcs-hash:20051217122546-ac50b-2bf9b1118fcbf9079398e113fb201ddde813e40a.gz
2005-12-17 22:25:46 +10:00
axel
78cd8fa089 Tweak a few error messages for builtin commands
darcs-hash:20051216155116-ac50b-d31da6fc28ef9140f24fb0d95397daaffb3ff6ab.gz
2005-12-17 01:51:16 +10:00
axel
e6bd3dbc40 Make the source builtin bail out at once if stat fails. Makes sure no illegal memory acces takes place
darcs-hash:20051216125437-ac50b-150f5404037186c5380884416b696d5869704a60.gz
2005-12-16 22:54:37 +10:00
James Vega
a91bf6d88a builtin.c: builtin_source now checks that its argument is a file.
Without this check, it would be possible to attempt to source a directory and get stuck in an infinite loop.

darcs-hash:20051215172122-35ec8-b3ce05d8d7ee9534edf92b74ca842d034b894e8a.gz
2005-12-16 03:21:22 +10:00
axel
fa75fc3901 Code cleanup
darcs-hash:20051215135902-ac50b-e9fc18bca34459ddb56e970a16c05e9b3cc54848.gz
2005-12-15 23:59:02 +10:00
axel
9cf4a2a0b3 Add extra step in instructions on creating a builtin
darcs-hash:20051214234808-ac50b-14d032091b843c4692f4548c9763b65c46b2fc92.gz
2005-12-15 09:48:08 +10:00
axel
418e26c0ac Fix crash bug from calling eval builtin with no arguments
darcs-hash:20051214134644-ac50b-5872ff628bf4f5d4f22f912d7ce7e9ed25d48b58.gz
2005-12-14 23:46:44 +10:00
axel
0a8284c981 Further tweaks to jobs builtin
darcs-hash:20051212155001-ac50b-bb6d180d8e0ca5150173a3dc3aa6cd7e021fa770.gz
2005-12-13 01:50:01 +10:00
axel
ddbb50acd7 Minor edits
darcs-hash:20051211233939-ac50b-e01a4024f70355f2b7f1b5377c6e0853997d9860.gz
2005-12-12 09:39:39 +10:00
axel
5262f3ce99 Revamp the jobs builtin
darcs-hash:20051211233001-ac50b-24547ca41d4db05f87d59dd3e396c3190a66ef89.gz
2005-12-12 09:30:01 +10:00
axel
1d69e70b7a Initial blocking implementation
darcs-hash:20051211222101-ac50b-6e11220bd608187fbb32a0313b5b73dbdc8354fc.gz
2005-12-12 08:21:01 +10:00
axel
4ba2709452 Improved error messages
darcs-hash:20051207160647-ac50b-4061540829a108381c20a1a6f3c8fd2d004a9800.gz
2005-12-08 02:06:47 +10:00
axel
32e833f331 Remove old event hooks, add more event handler documentation
darcs-hash:20051203194618-ac50b-e90683cb69b19da789152164a89a34bf187fd4e4.gz
2005-12-04 05:46:18 +10:00
axel
02981a1750 Minor cleanups
darcs-hash:20051129101303-ac50b-11843dc32a9d05037b907fe1ac5df6a90cb7dd36.gz
2005-11-29 20:13:03 +10:00
axel
8d58e58d7b Minor performance tweaks
darcs-hash:20051102154159-ac50b-9a32fb6cc654c593048840ebd9f6abb97c2e0bb8.gz
2005-11-03 01:41:59 +10:00
axel
277f9b7e60 Huge API documentation cleanup
darcs-hash:20051024152625-ac50b-41503feb4ea8d428c5b30c159aaae0c8f7ae46a2.gz
2005-10-25 01:26:25 +10:00
axel
83fcc29305 Do not break stdin when reading a script
darcs-hash:20051019120744-ac50b-67cc9a5c4f6509eb8a012aff32fcd9606933d0ab.gz
2005-10-19 22:07:44 +10:00
axel
9298f610f6 Add support for specifying event handler for calling job in command supstitution. Add psub shellscript function for process substitution
darcs-hash:20051015005126-ac50b-d2aedca3a50a78362502f3fa9dd8bf25cb7dc6e1.gz
2005-10-15 10:51:26 +10:00
axel
638df31ca4 Implement the ulimit builtin
darcs-hash:20051014223301-ac50b-f4e6303dcfbe26318e23020444b54d80fed9f535.gz
2005-10-15 08:33:01 +10:00
axel
0ebf6db4b9 Increase fish robustness by improving signal handling when forking jobs and minor signal handling improvements
darcs-hash:20051014114033-ac50b-8d0f6274ac590f1b6dbe82c55366f44ed7debf20.gz
2005-10-14 21:40:33 +10:00
axel
4ba35b8919 Stop using anonymous unions
darcs-hash:20051011193116-ac50b-ad5f877bc54069233f804dffd136656da3a2c8f1.gz
2005-10-12 05:31:16 +10:00
axel
838ba08eaa Event handling and job reaping updates
darcs-hash:20051011192343-ac50b-aa3f5ae5e2b34d122f10e3b59ceb6fdd447f4ae3.gz
2005-10-12 05:23:43 +10:00
axel
9ae7fa5831 Move io redirection functions to their own library
darcs-hash:20051008112051-ac50b-113caa4cba470a739e4bfbed9f479e2fed357be7.gz
2005-10-08 21:20:51 +10:00
axel
93eed7bc35 Spelling fixes
darcs-hash:20051008093310-ac50b-077bd66d4b2c3f98de421e04b125f0d89e9d503a.gz
2005-10-08 19:33:10 +10:00
axel
c84d360ae7 Allow explicitly local variable that die at EOF when sourcing files
darcs-hash:20051007212844-ac50b-d6494ae3271225e4833ef3550e9cfb0c5e3b3802.gz
2005-10-08 07:28:44 +10:00
axel
8ff36deeb4 API cleanup
darcs-hash:20051007103651-ac50b-3b518ce795adf2d39b8ebfcba6a2df7c36411b15.gz
2005-10-07 20:36:51 +10:00
axel
2ac6b62df2 Various updates to signal event handling
darcs-hash:20051006115416-ac50b-ab0a1be946f758cfdeaa5dfe172f417acb9b6e79.gz
2005-10-06 21:54:16 +10:00
axel
b9b841f603 Initial update for new event subsystem
darcs-hash:20051005223708-ac50b-8a8d7e003e1c24747f3f154cb66b6c1a1015c35b.gz
2005-10-06 08:37:08 +10:00
axel
660ddcb4ab Cast null pointers to (void *) in vararg functions
darcs-hash:20050930182826-ac50b-fa9960404bf69e57531ad02becb5015aaed35d69.gz
2005-10-01 04:28:26 +10:00
axel
6d4e6f40ce For-loop variable must have explicitly local scope
darcs-hash:20050926145835-ac50b-828ed718f1b4a4fdb949c597ce6a0b008926c11e.gz
2005-09-27 00:58:35 +10:00
axel
fcc980a519 Fix compiler warnings
darcs-hash:20050924195558-ac50b-1ad53fa963f71ce5b4aa42490789add2a3d48ab3.gz
2005-09-25 05:55:58 +10:00
axel
e3ce01d685 Key binding functions
darcs-hash:20050920234200-ac50b-3895a97cb024368258cd1562bdcc9fda2c84f521.gz
2005-09-21 09:42:00 +10:00
axel
149594f974 Initial revision
darcs-hash:20050920132639-ac50b-fa3b476891e1f5f67207cf4cc7bf623834cc5edc.gz
2005-09-20 23:26:39 +10:00